Skip to content
Laravel Packagev13.xMIT License946+ downloads

SEO: Every page, ready to be found and shared

SEO sets the title, meta tags, canonical and alternate links, Open Graph and Twitter cards of each page from a controller, a model or a view, and prints them all with @seo.

$composer require pharaonic/laravel-seo

Compatibility

Each line is released for the versions in its row, read from that release's composer.json. Pick the line that matches your project; a combination not listed isn't supported. Find the right line of every package for your project.

LineLatest releasePHPLaravelStatusDocs
v13.xv13.1.0 Nov 8, 20268.3 – 8.513Current Docs: Read the v13.x docs
v12.xv12.1.0 Nov 8, 20268.2 – 8.512Maintained Docs: Read the v12.x docs
v11.xv11.1.0 Nov 8, 20268.2 – 8.411MaintainedLaravel 11 no longer gets security fixes Docs: Read the v11.x docs
v10.xv10.1.0 Nov 8, 20268.1 – 8.310MaintainedLaravel 10 no longer gets security fixes Docs: Read the v10.x docs
v9.xv9.1.0 Nov 8, 20268.0 – 8.29MaintainedLaravel 9 no longer gets security fixes Docs: Read the v9.x docs
v8.xv8.1.0 Nov 8, 20268.0 – 8.18MaintainedLaravel 8 no longer gets security fixes Docs: Read the v8.x docs
v7.xv7.1.0 Nov 8, 20268.07MaintainedLaravel 7 no longer gets security fixes Docs: Read the v7.x docs
v6.xv6.1.0 Nov 8, 20268.06MaintainedLaravel 6 no longer gets security fixes Docs: Read the v6.x docs

Maintenance

Latest release
v13.1.0
Nov 8, 2026 (2 weeks ago)
Released lines
8
documented lines with a release; see compatibility
CI on develop
Tests passed
latest run Nov 8, 2026

From the package's releases and its GitHub Actions. A passing run means the test suite passed on develop, on every PHP version it supports; it isn't a security review, and each release line has its own runs on GitHub. Checked hourly.

A quick look

Set the tags in a controller, print them in the layout.

app/Http/Controllers/PostController.php
1public function show(Post $post)
2{
3 seo()->title->set($post->title);
4 seo()->description->set($post->excerpt);
5 seo()->images->add($post->cover_url);
6 seo()->canonical->set(route('posts.show', $post));
7 seo()->openGraph->setType('article');
8 
9 return view('posts.show', compact('post'));
10}
11 
12// resources/views/layouts/app.blade.php: <head> @seo </head>
Key Features

Everything a page needs to be found and shared

Set a value anywhere in the request; one directive prints the tags.

Meta Tags

Charset, viewport, <title>, description, keywords, author, robots and copyright.

Canonical & hreflang

Canonical URL, next and previous pages, and one alternate link per language.

Open Graph & Twitter

Both cards reuse the page title, description and images, so you set them once.

Eloquent Models

A model returns its SEO data from seo(), and seo()->model($post) applies it.

Blade Directives

@seoTitle, @seoImage and friends set tags from a view; @seo prints them.

Safe by Default

Every value is HTML-escaped, and tags never leak between Octane requests or queued jobs.

FAQ

SEO Questions

Quick answers about installing and using SEO.

What is SEO?

Titles, meta tags, canonical and alternate links, Open Graph and Twitter cards for Laravel, set from controllers, Eloquent models or Blade and printed with one directive. It's a free, open-source Laravel package by Pharaonic.

How do I install SEO?

Run composer require pharaonic/laravel-seo in your project's root directory.

What does SEO require?

The latest release requires PHP 8.3 – 8.5 and Laravel 13.

Can I set the tags from a Blade view?

Yes. Every tag has a directive, such as @seoTitle or @seoImage, and a child view runs before its layout, so @seo in the layout prints what the view set.

Can I add my own meta tags?

Yes. Extend SingleElement or MultipleElement and add the class to the elements option of the configuration; it renders with the others and gets its own directive.

Does it work with Laravel Octane and queues?

Yes. Each request and each queued job starts with a fresh set of tags.

Is SEO free to use?

Yes. SEO is open source under the MIT license, so you can use it in personal and commercial projects.

Where can I find the SEO documentation?

Read the SEO documentation for setup, configuration, and usage examples.

How do I report a bug or contribute to SEO?

Open an issue or a pull request on GitHub, or ask in the Pharaonic Discord.

Ready to dig in?

Read the full documentation for installation, configuration, every element, Open Graph and Twitter cards, Eloquent models, Blade directives and custom elements.