Level 2
just create a folder in Controllers directory and put all the admin controllers into that and Laravel will auto load them for you.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How do i separate usercontroller and admin controller.
User goes to Quiz panel.
Admin goes to Admin panel
Also in admin panel, i need CRUD for users in admin panel
Route::get('/', function () {
return view('quiz');
});
Route::group(['as' => 'admin::','middleware' => 'auth'], function () {
Route::get('dashboard', ['as' => 'dashboard', function () {
return view('pages.index');
}]);
Route::resource('admin', 'adminController');
Route::resource('user', 'userController');
});
Please or to participate in this conversation.