route lumen php code example
Example 1: lumen routes
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/', function () {
// Uses Auth Middleware
});
$app->get('user/profile', function () {
// Uses Auth Middleware
});
});
Example 2: lumen routes
$app->get($uri, $callback);
$app->post($uri, $callback);
$app->put($uri, $callback);
$app->patch($uri, $callback);
$app->delete($uri, $callback);
$app->options($uri, $callback);