shlogg · Early preview
Paul Redmond @paulredmond

Laravel SEO Made Easy With Lara-Head Package

Easily set up SEO in Laravel with code4mk/lara-head: `Khead::setOg([...])` & `{!! Khead::getOg() !!}` for Opengraph tags, or `Khead::setMeta('viewport', [...])` & `{!! Khead::getMeta('viewport') !!}` for viewport settings.

Easily set up SEO in your Laravel applications with the code4mk/lara-head package by Mostafa Kamal. Here’s an example of how you’d use this package to set Facebook Opengraph tags:
Khead::setOg([  "app_id" => [    "property"=>"fb:app_id",    "content"=>"123456789"  ],  "url" => [    "property"=>"og:url",    "content"=>"https://example.com/page.html"  ],  "type" => [    "property"=>"og:type", "content"=>"website"  ],  "title" => [    "property"=>"og:title",    "content"=>"Content Title"  ],  // ...]);
Then in your blade template you’d access to Opengraph settings and render them out with the fol...