public function update(CreateCommentRequest $request, $id)
 {
     $comment = $this->comment;
     $comment->user_id = $request->get('name');
     $comment->content = $request->get('content');
     $comment->project_id = $id;
     $comment->save();
     $project = Project::whereId($id)->first();
     $slug = $project->slug;
     $task = new Task();
     $tasks = $task->whereProject_id($id)->orderBy('id', 'desc')->first();
     //return view('projects.show', ['project' => $project, 'task' => $tasks]);
     return redirect()->route('projects.show', ['slug' => $slug, 'task' => $tasks]);
 }
 public function edit(Project $project)
 {
     $task = new Task();
     $tasks = $task->whereProject_id($project->id)->orderBy('id', 'desc')->first();
     return view('projects.edit', compact('project'), ['taskdesigns' => '1', 'task' => $tasks]);
 }
function projectStatus($projectID)
{
    return $status = \App\models\Task::whereProject_id($projectID)->orderBy('id', 'desc')->first();
}