Skip to content

Commit

Permalink
9
Browse files Browse the repository at this point in the history
  • Loading branch information
jareknikolasettl committed Jul 26, 2023
1 parent b7df459 commit 40c0feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/ProjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function mass_update(Request $request)
// where name = $request->old_name

// Insert Eloquent statement below
Project::where('name', $request->old_name)->update(['name' => $request->new_name]);

return redirect('/')->with('success', 'Projects updated');
}
Expand All @@ -35,7 +36,7 @@ public function destroy($projectId)
Project::destroy($projectId);

// TASK: change this Eloquent statement to include the soft-deletes records
$projects = Project::all();
$projects = Project::withTrashed();

return view('projects.index', compact('projects'));
}
Expand Down

0 comments on commit 40c0feb

Please sign in to comment.