Last active
July 27, 2019 13:07
-
-
Save ridhof/07ebb9dadd5d9e84d2ce903c6efbeb75 to your computer and use it in GitHub Desktop.
This file contains 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 | |
use \Illuminate\Http\Request; | |
/* | |
|-------------------------------------------------------------------------- | |
| 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('/login', function (Request $request) { | |
$token = app('auth')->attempt($request->only('email', 'password')); | |
return response()->json(compact('token')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment