hasOne(CostProject::class, 'id', 'project_id'); } public function contract() { return $this->hasOne(CostApprovedProject::class, 'id','affcontract'); } }