-
-
Save jeffandersen/9004135fa68cdf327859fbfc8d6d8dc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add New Task | |
Route::post('/task', function (Request $request) { | |
// ... | |
$task->save(); | |
Cache::forget('all_tasks'); | |
return redirect('/'); | |
}); | |
// Delete Task | |
Route::delete('/task/{task}', function (Task $task) { | |
$task->delete(); | |
Cache::forget('all_tasks'); | |
return redirect('/'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment