Question : lumen routes
Answered by : snippets
$app->group(['middleware' => 'auth'], function () use ($app) { $app->get('/', function () { // Uses Auth Middleware }); $app->get('user/profile', function () { // Uses Auth Middleware });
});
Source : https://lumen.laravel.com/docs/5.4/routing | Last Update : Wed, 28 Oct 20
Question : lumen optional route parameters
Answered by : innocent-impala-psywka5ok9p9
$app->get('user[/{name}]', function ($name = null) { return $name;
});
Source : https://lumen.laravel.com/docs/5.4/routing#optional-parameters | Last Update : Mon, 15 Nov 21
Question : lumen routes
Answered by : snippets
$app->get($uri, $callback);
$app->post($uri, $callback);
$app->put($uri, $callback);
$app->patch($uri, $callback);
$app->delete($uri, $callback);
$app->options($uri, $callback);
Source : https://lumen.laravel.com/docs/5.4/routing | Last Update : Wed, 28 Oct 20