Sample module

This commit is contained in:
Nabeel Shahzad
2017-12-01 14:38:30 -06:00
parent a829bf7678
commit 21c7fa4dc6
15 changed files with 385 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
<?php
Route::group([
'as' => 'sample.',
'prefix' => 'sample',
'middleware' => [
'web',
'role:admin|user' # leave blank for public
],
'namespace' => 'Modules\Sample\Http\Controllers'
], function() {
# all your routes are prefixed with the above prefix
# e.g. yoursite.com/sample
Route::get('/', 'SampleController@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');
});
});