Search code examples
phplaravelcontent-management-systemstore

Easy way to control homepage content with laravel


So I've done creating the cms for e-commerce that will handle all the operations for products, categories ...etc, now I want to control the content of the homepage like setting featured products, offers, and new collections.

What's the best idea to make an easy control page to edit this content?

I've tried to use Presets like this:

enter image description here

but of course, there should be another idea


Solution

  • I would do it with a category like table, but only to control the e-commerce home.

    Another option could be to use polymorphic tables. A polymorphic relationship allows the target model to belong to more than one type of model using a single association.

    Then you could make a table like the one you put in your question, but with associated products, banners or categories, this way you wouldn't be touching resources you shouldn't.

    You can read more about it here