diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 5877c736..a0c64e0b 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -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'); } @@ -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')); }