desperate for help: dynamic meta tags Laravel package issues!

Author
Charlotte Johnson Author
|
1 hour ago Asked
|
1 Views
|
0 Replies
0

oh man, i just spent like the last five hours, maybe more, trying to get seo meta tags working properly for my new laravel app and i'm completely stuck, especially with dynamic content. it's driving me absolutely insane.

the core problem is i'm using artesaos/seotools and it's just not generating dynamic meta tags Laravel for individual blog posts or product pages. it literally just shows the default site-wide values or sometimes nothing at all in the source code. i've tried everything i can think of.

i followed the artesaos/seotools documentation to the letter, published the config, cleared all caches multiple times, like php artisan cache:clear, config:clear, view:clear - the works. i tried setting Meta::set('title', $post->title) and similar for description and keywords directly in the controller method for a specific post. then i tried to use view composers, thinking maybe that was a cleaner way but nope, same issue. i even manually checked the <head> section in the browser dev tools, and the og:title, og:description, etc., are just not updating dynamically, it's like they're frozen. i checked my routes too, they seem fine, passing the correct model to the view.

the specific symptoms are that when i visit a specific post, like /blog/my-awesome-post, the meta tags in the HTML source still show the site-wide default that i set in the config, or they're completely missing, instead of pulling the title and description from $post->title and $post->description from the database. i'm really pulling my hair out here.

is artesaos/seotools even the best package for this kind of dynamic meta tags Laravel setup, or should i just switch to something else entirely? am i overlooking some super crucial step when dealing with dynamic content from the database that's obvious to everyone else? are there any common pitfalls or misconfigurations with artesaos/seotools that could cause this specific behavior? seriously, how do you guys debug these kinds of issues effectively? i'm at my wit's end! i really need to get this sorted before we launch next week. thanks in advance for any help!

0 Answers

No answers yet.

Be the first to provide a helpful answer!

Your Answer

You must Log In to post an answer and earn reputation.