Created
January 8, 2019 16:16
-
-
Save OlabodeAbesin/d8fe0fc8cae443ab56ec5fb0c3d9642a to your computer and use it in GitHub Desktop.
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
//User Auth | |
Route::post('userlogin', 'Api\User\Auth\LoginController@login'); | |
Route::post('userregister', 'Api\User\Auth\RegisterController@register'); | |
//Admin Auth | |
Route::post('adminlogin', 'Api\Admin\Auth\LoginController@login'); | |
Route::post('adminregister', 'Api\Admin\Auth\RegisterController@register'); | |
//Here is the protected User Routes Group, | |
Route::group(['middleware' => 'jwt.auth', 'prefix' => 'user'], function(){ | |
Route::get('logout', 'Api\User\UserController@logout'); | |
Route::get('dashboard', 'Api\User\UserController@dashboard'); | |
}); | |
//Here is the protected Admin Routes Group | |
Route::group([ 'prefix' => 'admin'], function(){ | |
Route::post('settings', 'Api\Admin\AdminController@settings'); | |
Route::post('dashboard', 'Api\Admin\AdminController@dashboard'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you didn't put the middleware in admin => please add and add some controller with it... using user and admin