Support the ongoing development of Laravel.io →
Views Blade

I have a master blade layout with meta_keywords, meta_description and title tags and want to populate them from database.

Should I do it within a view or controller?

Would appreciate any help.

Last updated 2 years ago.
0

Check out using View Composers. http://laravel.com/docs/responses#view-composers

Last updated 2 years ago.
0

Kindari said:

Check out using View Composers. http://laravel.com/docs/responses#view-composers

I may be wrong, but is it possible to populate meta tags for categories, posts, products and other pages?

How should I pass id of the article to get those meta tags from db?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.