1 year ago

HowTo? Create Entity for users and editable in adminpanel?

Posted 1 year ago by LaravelKid

I am unsure how to design the controllers and models.

Lets say I have an "Item"-Entity and everyone can see all Items displayed on the homepage and view a single Item. Normally I would create with "php artisan make:controller ItemsController -r -m Item". And all the actions "index, show, create, store, edit, update, destroy".

But I wanna create a adminpanel where admins can see the "Items"-Entity as well as create, update and delete them. Do I create another controller called ItemsController inside an "admin" folder and reference the same model as the normal controller, or what is the best way to do so?

Sorry for my bad english.

Please sign in or create an account to participate in this conversation.