Skip to content

Instantly share code, notes, and snippets.

@jinoantony
Created January 15, 2019 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jinoantony/3d9958805338fa66e667500aa0196d05 to your computer and use it in GitHub Desktop.
Save jinoantony/3d9958805338fa66e667500aa0196d05 to your computer and use it in GitHub Desktop.
<?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' => 'admin','middleware' => ['assign.guard:admins','jwt.auth']],function ()
{
Route::get('/demo','AdminController@demo');
});
Route::group(['prefix' => 'subadmin','middleware' => ['assign.guard:subadmins','jwt.auth']],function ()
{
Route::get('/demo','SubadminController@demo');
});
Route::group(['prefix' => 'user','middleware' => ['assign.guard:admins','jwt.auth']],function ()
{
Route::get('/demo','UserController@demo');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment