simplify the routes file a bit

This commit is contained in:
Nabeel Shahzad
2017-12-01 16:15:29 -06:00
parent dbb6e9b4fe
commit 5e2bbe69dc
4 changed files with 28 additions and 20 deletions

View File

@@ -1,14 +1,8 @@
<?php
Route::group([
'as' => '$LOWER_NAME$.',
'prefix' => '$LOWER_NAME$',
'middleware' => [
'web',
'role:admin|user' # leave blank for public
],
'namespace' => '$MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers'
], function() {
Route::group(['middleware' => [
'role:admin|user' # leave blank to make this public
]], function() {
# all your routes are prefixed with the above prefix
# e.g. yoursite.com/sample