Routing in laravel

Route::get('/', function(){
return "welcome";
});

Route::post('loginUser', 'UserController@loginUser');
Route::group(['middleware' => ['web']], function () {
Route::get('admin/logout', 'Auth\AuthController@getAdminLogout');
Route::get('admin/login', 'Auth\AuthController@getAdminLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

Route::group(['middleware' => ['auth']], function () {
Route::controller('user', 'UserController');
Route::get('admin/dashboard', 'UserController@dashBoard');
Route::get('admin/profile', 'UserController@getAdminProfile');
Route::post('admin/profile', 'UserController@postAdminProfile');

});
});

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *