Laravel: Managing Frontend from Backend

Laravel: Managing Frontend from Backend

Assalamualaikum / Hi,

A simple user case: How can you setup your frontend from the backend? Means, how you going to display a view, from a value set in database.

For instance, you have a reference table in database named statuses. In the table, you have id,label,name. How do you use values from database to create view – in term of management and usability?

During seeding / add new data: standardised the label name. In my case, I use lower case.
Then, create views based on generated values in label field.
Then here how you can use it. In my case, I have setup relationship with Course model. So that’s how I access to the label field and get the view for the status.
The Result

Leave a Reply

Your email address will not be published. Required fields are marked *

eight − 5 =