routes in laravel 6 code example
Example 1: laravel route optional parameter
Route::get('/sample/{param?}', 'SampleController@index');
Example 2: laravel route namespace and prefix
use App\Models\User;
Route::get('/users/{user}', function (User $user) {
return $user->email;
});