Skip to content

Instantly share code, notes, and snippets.

@jeffandersen
Created December 13, 2018 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffandersen/19ffc37fa49e29cf7ec05647c44ebb5e to your computer and use it in GitHub Desktop.
Save jeffandersen/19ffc37fa49e29cf7ec05647c44ebb5e to your computer and use it in GitHub Desktop.
// Show Tasks
Route::get('/', function () {
$tasks = Cache::rememberForever('all_tasks', function () {
return Task::orderBy('created_at', 'asc')->get();
});
return view('tasks', [
'tasks' => $tasks
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment