2017-12-02 04:34:37 +08:00
|
|
|
<?php
|
|
|
|
|
2017-12-02 06:15:29 +08:00
|
|
|
Route::group(['middleware' => [
|
|
|
|
'role:admin|user' # leave blank to make this public
|
|
|
|
]], function() {
|
2017-12-02 04:34:37 +08:00
|
|
|
|
|
|
|
# all your routes are prefixed with the above prefix
|
|
|
|
# e.g. yoursite.com/sample
|
|
|
|
Route::get('/', '$STUDLY_NAME$Controller@index');
|
|
|
|
|
|
|
|
# This is the admin path. Comment this out if you don't have
|
|
|
|
# an admin panel component.
|
|
|
|
Route::group([
|
|
|
|
'middleware' => ['role:admin'],
|
|
|
|
], function () {
|
|
|
|
Route::get('/admin', 'AdminController@index');
|
|
|
|
});
|
|
|
|
});
|