How to setup second admin panel under the same domain but another path? #1048
-
I have an admin, which is working fine. Now I want to have another simple admin (portal) for regular users to see other details. For example in e-commerce.
I want one more Portal for users which should be done with Backpack, where users, for ex. can see their history, orders, etc. I don't want to move shared code to the library and create 2 separate projects Admin and Portal, I would like to have then under the same project. Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @mialex Let's say your current routes setup is like:
And In the demo, you can notice a pet-shop:
In the same way, I recommend you create separate routes & CRUD controllers for each role. To change the word
After, your final URLs would be:
For Implementing User Access Control and Permissions, check this article. |
Beta Was this translation helpful? Give feedback.
Hey @mialex
Let's say your current routes setup is like:
APP_URL = domain.test
route_prefix
=admin
App\Http\Controllers\Admin;
https://domain.test/admin/order
And In the demo, you can notice a pet-shop:
App\Http\Controllers\Admin\PetShop
In the same way, I recommend you create separate routes & CRUD controllers for each role. To change the word
admin
from the URL, you changeroute_prefix
. For example:route_prefix
=adminshop
.App\Http\Controllers\Backpack\User
namespace.