diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 52556c9f..198cd758 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -11,9 +11,9 @@ public function store(Request $request) // TASK: Add one sentence to save the project to the logged-in user // by $request->project_id and with $request->start_date parameter - $user=auth()->user(); - - $user->projects()->attach($request->project_id,['start_data'=>$request->start_date]); + + + auth()->user()->projects()->attach($request->project_id,['start_date'=>$request->start_date]); return 'Success'; }