jwohlfert23 / laravel-seo
SEO tools to insert meta data in laravel projects
Installs: 5 346
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.9
- illuminate/config: >=5.0
- illuminate/support: >=5.0
- nesbot/carbon: ~2
README
Laravel SEO
Installation
Install package
composer require jwohlfert23/laravel-seo
You can publish the config to change default setting like the base of your title, twitter handle, etc.
php artisan vendor:publish --provider="Jwohlfert23\LaravelSeo\ServiceProvider"
Add Jwohlfert23\LaravelSeo\SeoTrait
to your base controller. This will allow you to easily change the page title and other meta information directly from your controller like so...
public function index()
{
$this->seo()->setTitle('Home')->setDescription('This is out home page');
return view('home');
}
Insert app('seo')->render()
into the head of your layout like so...
<head>
....
{!! app('seo')->render() !!}
...
</head>