Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created May 31, 2020 06:49
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 uno-de-piera/7b5e9338ae9933b96cb3133575af970a to your computer and use it in GitHub Desktop.
Save uno-de-piera/7b5e9338ae9933b96cb3133575af970a to your computer and use it in GitHub Desktop.
<?php
Route::group(['prefix' => 'users', 'middleware' => 'auth'], function()
{
Route::get('/:id', function($id) {
echo $id;
})->name('users.detail');
Route::get('/', function() {
$users = \App\User::all();
return view('users.index', compact('users'));
})->name('users.index');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment