Created
November 8, 2020 14:24
-
-
Save blogcacanid/3901c3a7cce80cb57313fe96c0806f83 to your computer and use it in GitHub Desktop.
web.php Authentication JWT Lumen 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. | |
| | |
*/ | |
$router->get('/', function () use ($router) { | |
return $router->app->version(); | |
}); | |
$router->group(['prefix' => 'api/auth'], function () use ($router) | |
{ | |
$router->post('register', 'AuthController@register'); | |
$router->post('login', 'AuthController@login'); | |
}); | |
$router->group(['prefix' => 'api/test'], function () use ($router) | |
{ | |
$router->get('all', 'AuthController@allAccess'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment