12345678910111213141516171819202122232425262728293031 |
- <?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');
- }
- }
|