-
-
Save oliuz/780d7f841839bc04577b25e896c99bd5 to your computer and use it in GitHub Desktop.
This route will require authentication with a valid api_token, and then return the relevant user, as JSON. - https://laracasts.com/series/whats-new-in-laravel-5-2/episodes/5
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 | |
| Route::group([ | |
| 'prefix' => 'api/v1', | |
| 'middleware' => ['api', 'auth:api'] | |
| ], function () { | |
| Route::get('/', function () { | |
| return Auth::guard('api')->user(); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment