Soft deletes task

This commit is contained in:
PovilasKorop
2021-11-16 10:45:45 +02:00
parent a5acfdd85f
commit 328e51c4ee
7 changed files with 45 additions and 1 deletions
@@ -28,4 +28,14 @@ class ProjectController extends Controller
return redirect('/')->with('success', 'Projects updated');
}
public function destroy($projectId)
{
Project::destroy($projectId);
// TASK: change this Eloquent statement to include the soft-deletes records
$projects = Project::all();
return view('projects.index', compact('projects'));
}
}