dbfdg where('id', $this->project_id)->first(); return $project ? $project->project_name : ''; } public function getProjectTaskAttribute($value) { $task = ProjectTask::select('id', 'name')->where('id', $this->task_id)->first(); return $task ? $task->name : ''; } public function getTotalAttribute($value) { $total = Utility::second_to_time($this->total_time); return $total ? $total : '00:00:00'; } }