Hello relume,
You could utilize Laravel Blade Components to create a reusable view component.
For example, you could make a Blade component for an item in a list and pass the data like this:
<x-item :title="$title" :description="$description" />
When it comes to the variation problem, you could create a specialize set of item component and logic to further fits your needs. For example:
<x-item-user :name="$name" :contact="$contact" />
<x-item-product :title="$title" :price="$price" />
I don't know if its considered best practices or not, but it says much about how I would approach the situation. Hope it helps.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community