Updates for addon/modules to make it easier to create APIs

This commit is contained in:
Nabeel Shahzad
2018-02-08 19:11:53 -06:00
parent b4ea82f327
commit bcc6be0d29
18 changed files with 216 additions and 44 deletions
+1 -10
View File
@@ -1,18 +1,9 @@
<?php
Route::group(['middleware' => [
'role:admin|user' # leave blank to make this public
'role:user' # leave blank to make this public
]], function() {
# 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');
});
});