<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Project extends Model { protected $table = "project"; public $timestamps = false; public function client() { return $this->hasOne('App\User', 'id', 'client_id'); } public function tasks() { return $this->hasMany('App\Models\Task','proj_id','id'); } public function documents() { return $this->hasMany('App\Models\ProjAttachment','proj_id','id'); } public function proj_assign() { return $this->hasMany('App\Models\AssignProject','proj_id','id'); } }