Files
commander_league_api/routes/web.php
Kevin ANATOLE a7ab7f56ef Profile
- Save the profile into the current request when the user is
authenticated
- Created the migration for the profiles table
- Created the Profile model
- Created route to retrieve the current user's profile
2020-11-01 08:50:51 +00:00

22 lines
738 B
PHP

<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
/** @var $router \Laravel\Lumen\Routing\Router */
$router->get('/', function () use ($router) {
return $router->app->version();
});
$router->get('/formats', ['uses' => 'FormatsController@index', 'as' => 'formats.list']);
$router->get('/profiles', ['uses' => 'ProfilesController@current', 'as' => 'profiles.current', 'middleware' => 'auth']);