Created
December 29, 2018 03:19
-
-
Save bengitiger/8a16f692d9269eaed9d6e0aabb9d065f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('/', function () { | |
return view('welcome'); | |
}); | |
Auth::routes(); | |
Route::group([ | |
'as' => 'user.', | |
'prefix' => 'user', | |
'middleware' => 'auth', | |
'namespace' => 'User', | |
], function () { | |
Route::get('/profile', 'UserController@profile')->name('profile'); | |
Route::post('/profile', 'UserController@avatar_update')->name('profile.upload'); | |
}); | |
Route::group([ | |
'as' => 'admin.', | |
'prefix' => 'admin', | |
'middleware' => [ | |
'auth', | |
'admin' | |
], | |
'namespace' => 'Admin', | |
], function () { | |
Route::get('dashboard', 'DashBoardController@index')->name('dashboard'); | |
Route::resource('tag', 'TagController'); | |
Route::resource('category', 'CategoryController'); | |
Route::resource('post', 'PostController'); | |
}); | |
Route::group([ | |
'as' => 'manager.', | |
'prefix' => 'author', | |
'middleware' => [ | |
'auth', | |
'author' | |
], | |
'namespace' => 'Author', | |
], function () { | |
Route::get('dashboard', 'DashBoardController@index')->name('dashboard'); | |
Route::resource('post', 'PostController'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment