Skip to content

Commit

Permalink
Update ProjectController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
OhmygoodR authored Jan 27, 2024
1 parent b2585ec commit 462a94d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/ProjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 462a94d

Please sign in to comment.