Anyone?
Handling SEO/Meta Tags in Laravel
Handling SEO/Meta Tags in Laravel question....
What is the best way to handle Meta tags? The problem I'm running into is I have "static" pages like the home page, contact us, about us, and so on. but i also have dynamic, like discussion post. I want to be able to have a global set of meta tags, and a default set of meta tags... then be able to override the meta tags on dynamic pages. I'm thinking about doing a Polymorphic Relationship. something like a Meta data table, then a pages table that holds the static page (matched by slug = name of route). Then to handle the other pages, like a dynamic discussion post, would be posts then morph to the meta table.
Assuming the above is all correct way of doing this, where would I handle the logic to decide what meta tags to render? Middleware? or maybe something like a view composer on the header view partial and let that figure it out... if has name, use page model else if is post, use post table.. and so on.
Please or to participate in this conversation.