hasMany('App\ProjectImage', 'project_id', 'id'); } public function detail() { return $this->hasOne('App\ProjectDetail', 'project_id', 'id'); } }