Created
June 30, 2019 05:48
-
-
Save sadam1807/43a19f1cf372841fac91f85e07334302 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; | |
/* | |
|-------------------------------------------------------------------------- | |
| API Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register API routes for your application. These | |
| routes are loaded by the RouteServiceProvider within a group which | |
| is assigned the "api" middleware group. Enjoy building your API! | |
| | |
*/ | |
Route::group([ 'prefix' => 'auth'], function (){ | |
Route::group(['middleware' => ['guest:api']], function () { | |
Route::post('login', 'API\AuthController@login'); | |
Route::post('signup', 'API\AuthController@signup'); | |
}); | |
Route::group(['middleware' => 'auth:api'], function() { | |
Route::get('logout', 'API\AuthController@logout'); | |
Route::get('getuser', 'API\AuthController@getUser'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment