Answer the question
In order to leave comments, you need to log in
How do you separate frontend admins in Laravel?
Greetings!
I am a yii2 developer, I want to feel Laravel . And then everyone praises until you touch it yourself. you won't understand. Yii2
has a ready-made split version for the frontend and backend. Made as two completely different applications. Everything is great, except that in such a division, only one problem occurs with downloading files from the admin panel. It should be visible both in the admin panel and on the site. And the frontend and backend are in different folders. I solved the problem with nesting one web folder into another. Well, the root of the site at the admin was /web/ for the domain, and at the frontend /web/public/ for another domain.
A little perverse, but without duplicating files when uploading.
How do you separate such cases in Lravel ?
Answer the question
In order to leave comments, you need to log in
Admin controllers in /app/Http/Controllers/Admin
Separate authorization in /app/Http/Controllers/Admin/Auth Admin
routes in a separate file, in a group:
Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'middleware' => ['auth', 'permission:use-admin-panel', 'crsf']], function() {
Route::get('/', ['as' => 'admin.dashboard', 'uses' => '[email protected]']);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question