Closed omarherri closed 1 year ago
can you please tell me if this package support macro feature, so that i can use some of the code in multiple places.
this is an exemple of use case:
Macro file:
SEO::macro('detail', function ($product) { SEO::jsonLd()->addValue('@graph', [ '@type' => 'Product', '@id' => request()->url() . '#product', 'name' => ucfirst($product->meta->name), 'url' => request()->url(), 'description' => ucfirst($product->meta->name) //.... ]); });
And in my controller i can use this: SEO::detail($product);
SEO::detail($product);
Reference to original pull request: https://github.com/artesaos/seotools/pull/256
can you please tell me if this package support macro feature, so that i can use some of the code in multiple places.
this is an exemple of use case:
Macro file:
And in my controller i can use this:
SEO::detail($product);