PHPackages                             lara-zeus/laravel-seo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lara-zeus/laravel-seo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lara-zeus/laravel-seo
=====================

v2.0.0(2mo ago)152.6k↓29.6%[2 PRs](https://github.com/lara-zeus/laravel-seo/pulls)1MITPHPPHP ^8.2CI passing

Since Mar 3Pushed 1w ago1 watchersCompare

[ Source](https://github.com/lara-zeus/laravel-seo)[ Packagist](https://packagist.org/packages/lara-zeus/laravel-seo)[ Fund](https://www.buymeacoffee.com/larazeus)[ GitHub Sponsors](https://github.com/atmonshi)[ RSS](/packages/lara-zeus-laravel-seo/feed)WikiDiscussions 2.x Synced 2d ago

READMEChangelog (3)Dependencies (22)Versions (10)Used By (1)

Laravel SEO
===========

[](#laravel-seo)

This is a fork from [laravel-seo](https://github.com/archtechx/laravel-seo)
===========================================================================

[](#this-is-a-fork-from-laravel-seo)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9b03a8f037f6c28d481cbd0140b19dd05eef6313c248cb686a0c0aeae080a1a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172612d7a6575732f6c61726176656c2d73656f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lara-zeus/laravel-seo)[![Tests](https://camo.githubusercontent.com/57e62d3b740c00cf66b8a487ca579fcbd72eefeb9bd57f8004fc7a178913c9b7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172612d7a6575732f6c61726176656c2d73656f2f72756e2d74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265266272616e63683d312e78)](https://github.com/lara-zeus/laravel-seo/actions?query=workflow%3Arun-tests+branch%3A1.x)[![Code Style](https://camo.githubusercontent.com/2355ae2a1edc78796d5096bd243952de9eda7250f7d0b012ba623966247ec010/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172612d7a6575732f6c61726176656c2d73656f2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6c6162656c3d636f64652d7374796c6526666c61742d737175617265)](https://github.com/lara-zeus/laravel-seo/actions?query=workflow%3Afix-php-code-style-issues+branch%3A1.x)[![Total Downloads](https://camo.githubusercontent.com/81cc8438c13eff4013a7232617fe188adb47645041c6701afe608929bc32aceb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172612d7a6575732f6c61726176656c2d73656f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lara-zeus/laravel-seo)[![Total Downloads](https://camo.githubusercontent.com/67f7897df4b4c9c640a21300d0f624df73dca0b6221a5936c1d4cb6e2a3510c6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c6172612d7a6575732f6c61726176656c2d73656f3f7374796c653d666c61742d737175617265)](https://github.com/lara-zeus/laravel-seo)

This is a simple and extensible package for improving SEO via meta tags, such as OpenGraph tags.

By default, it uses `` and OpenGraph tags. It also ships with a Twitter extension. You're, of course, free to write your own extensions as needed.

**Features**:

- Setting SEO tags from PHP
- Setting SEO tags from Blade
- Integration with [Flipp](https://useflipp.com) and [Previewify](https://previewify.app), to automatically generate cover images
- Custom extension support
- Expressive &amp; simple API
- Customizable views

Example usage:

```
seo()
    ->title($post->title)
    ->description($post->excerpt)
    ->twitter()
    ->flipp('blog')

// Adds OpenGraph tags
// Adds Twitter card tags
// Generates social image using Flipp and sets it as the cover photo
```

Installation
------------

[](#installation)

```
composer require lara-zeus/laravel-seo
```

And add the following line to your layout file's `` tag:

```

```

Usage
-----

[](#usage)

The package can be used from any PHP code, or specifically from Blade using the `@seo` directive.

### PHP

[](#php)

Use the `seo()` helper to retrieve the SeoManager instance, on which you can call the following methods:

Available methods:

```
site(string $site)
url(string $url)
title(string $title)
description(string $description)
image(string $url)
type(string $type)
locale(string $locale)

twitterCreator(string $username)
twitterSite(string $username)
twitterTitle(string $title)
twitterDescription(string $description)
twitterImage(string $url)
```

Example usage:

```
seo()->title('foo')->description('bar')
```

### Blade views

[](#blade-views)

You can use the `@seo` directive to call the methods from Blade:

```
@seo('title') // Echoes the title
@seo('title', 'foo') // Sets the title & echoes it
@seo(['title' => 'foo']) // Sets the title without echoing it
```

In general, you'll want to use `@seo(['title' => 'foo'])` at the start of a view — to set the values — and `@seo('title')` inside the view if you wish to fetch the value.

That is, if you'll use the helpers in Blade at all. Some apps will only use the PHP helper.

For Twitter, use the `twitter.author` format, e.g. `@seo('twitter.author')`.

### Twitter

[](#twitter)

By default, no Twitter tags will be included. If you manually enable the extension by calling:

```
seo()->twitter();
```

in a service provider for example, the extension will be enabled.

Once it's enabled, it will copy all default (OpenGraph) values and use them for the Twitter card schema.

When a value is set specifically for Twitter, it will be prioritized over the general fallback values.

```
seo()->twitterTitle('About us')
```

### Favicons

[](#favicons)

By default, no favicon links will be included. You can manually enable the extension by calling:

```
seo()->favicon();
```

Generating favicons
-------------------

[](#generating-favicons)

To generate favicon, run:

```
php artisan seo:generate-favicons public/path-to/logo.png

```

from the artisan console. If no path argument is given we'll fallback to `public/assets/logo.png`.

We'll generate a 32x32px `public/favicon.ico` &amp; `public/favicon.png` icon. This should be sufficient for most cases.

**Please keep in mind that you need to install the [imagick](https://pecl.php.net/package/imagick) php extension and [intervention/image](http://image.intervention.io/) composer package.**

### Defaults

[](#defaults)

To configure default values, call the methods with the `default` argument:

```
seo()
    ->title(default: 'LaraZeus — Meticulously architected web applications')
    ->description(default: 'We are a web development agency that ...');
```

### Extra tags

[](#extra-tags)

To add more tags to the document head, you can use the `tag()` and `rawTag()` methods:

```
seo()->tag('fb:image', asset('foo'));
seo()->rawTag('');
seo()->rawTag('fb_url', ''); // Keyed, allows overrides later on
```

### Canonical URL

[](#canonical-url)

To enable the `og:url` and canonical URL `link` tags, call:

```
seo()->withUrl();
```

This will make the package read from `request()->url()` (the current URL *without* the query string).

If you wish to change the URL, call `seo()->url()`:

```
seo()->url(route('products.show', $this->product));
```

### Locale

[](#locale)

To set the `og:locale` property:

```
seo()->locale('de_DE');
```

Expected format is `language_TERRITORY`.

### Modifiers

[](#modifiers)

You may want to modify certain values before they get inserted into the template. For example, you may want to suffix the meta `` with `| LaraZeus` when it has a non-default value.

To do that, simply add the `modify` argument to the method calls like this:

```
seo()->title(modify: fn (string $title) => $title . ' | LaraZeus');
```

You can, of course, combine these with the defaults:

```
seo()->title(
    default: 'LaraZeus — Meticulously architected web applications',
    modify: fn (string $title) => $title . ' | LaraZeus'
);
```

Which will make the package use the default if no title is provided, and if a title is provided using e.g. `seo()->title('Blog')`, it will be modified **right before being inserted into the template**.

### Flipp integration

[](#flipp-integration)

First, you need to add your Flipp API keys:

1. Add your API key to the `FLIPP_KEY` environment variable. You can get the key [here](https://useflipp.com/settings/profile/api).
2. Go to `config/services.php` and add: ```
    'flipp' => [
        'key' => env('FLIPP_KEY'),
    ],
    ```

Then, register your templates, for example in `AppServiceProvider`:

```
seo()->flipp('blog', 'v8ywdwho3bso');
seo()->flipp('page', 'egssigeabtm7');
```

After that, you can use the templates by calling `seo()->flipp()` like this:

```
seo()->flipp('blog', ['title' => 'Foo', 'content' => 'bar'])`
```

The call will set the generated image as the OpenGraph and Twitter card images. The generated URLs are signed.

If no data array is provided, the method will use the `title` and `description` from the current SEO config:

```
seo()->title($post->title);
seo()->description($post->excerpt);
seo()->flipp('blog');
```

The `flipp()` method also returns a signed URL to the image, which lets you use it in other places, such as blog cover images.

```

```

### Previewify integration

[](#previewify-integration)

First, you need to add your Previewify API keys:

1. Add your API key to the `PREVIEWIFY_KEY` environment variable. You can get the key [here](https://previewify.app/app/account).
2. Go to `config/services.php` and add: ```
    'previewify' => [
        'key' => env('PREVIEWIFY_KEY'),
    ],
    ```

Then, register your templates, for example in `AppServiceProvider`:

```
seo()->previewify('blog', 24);
seo()->previewify('page', 83);
```

After that, you can use the templates by calling `seo()->previewify()` like this:

```
seo()->previewify('blog', ['title' => 'Foo', 'content' => 'bar'])`
```

The call will set the generated image as the OpenGraph and Twitter card images. The generated URLs are signed.

If no data array is provided, the method will use the `title` and `description` from the current SEO config:

```
seo()->title($post->title);
seo()->description($post->excerpt);
seo()->previewify('blog');
```

The `previewify()` method also returns a signed URL to the image, which lets you use it in other places, such as blog cover images.

```

```

> **Note**The `previewify:` prefix will be automatically prepended to all provided data keys.

Examples
--------

[](#examples)

### Service Provider

[](#service-provider)

This example sets the default state in a service provider's `boot()` method:

```
seo()
    ->site('LaraZeus — Meticulously architected web applications')
    ->title(
        default: 'LaraZeus — Meticulously architected web applications',
        modify: fn (string $title) => $title . ' | LaraZeus'
    )
    ->description(default: 'We are a development agency ...')
    ->image(default: fn () => asset('header.png'))
    ->flipp('blog', 'o1vhcg5npgfu')
    ->twitterSite('@larazeus');
```

### Controller

[](#controller)

This example configures SEO metadata from a controller.

```
public function show(Post $post)
{
    seo()
        ->title($post->title)
        ->description(Str::limit($post->content, 50))
        ->flipp('blog', ['title' => $page->title, 'content' => $page->excerpt]);

    return view('blog.show', compact($post));
}
```

### View

[](#view)

This example uses a Blade view that sets global SEO config using the values that are passed to the view.

```
@seo(['title' => $page->name])
@seo(['description' => $page->excerpt])
@seo(['flipp' => 'content'])

{{ $page->title }}
{{ $page->excerpt }}

    {{ $page->body }}

```

Customization
-------------

[](#customization)

This package is completely flexible, and can be customized either by having its views modified (to change the existing templates), or by you developing an extension (to add more templates).

### Views

[](#views)

You can publish the Blade views by running `php artisan vendor:publish --tag=seo-views`.

### Extensions

[](#extensions)

To use a custom extension, create a Blade *component* with the desired meta tags. The component should read data using `{{ seo()->get('foo') }}` or `@seo('foo')`.

For example:

```

```

Once your view is created, register the extension:

```
seo()->extension('facebook', view: 'my-component');
// The extension will use
```

To set data for an extension (in our case `facebook`), simply prefix calls with the extension name in camelCase, or use the `->set()` method:

```
seo()->facebookFoo('bar');
seo()->facebookTitle('About us');
seo()->set('facebook.description', 'We are a web development agency that ...');
seo(['facebook.description' => 'We are a web development agency that ...']);
```

To disable an extension, set the second argument in the `extension()` call to false:

```
seo()->extension('facebook', false);
```

Development
-----------

[](#development)

Run all checks locally:

```
./check
```

Code style will be automatically fixed by php-cs-fixer.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance92

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~104 days

Total

5

Last Release

70d ago

Major Versions

v1.0.0 → v2.0.02026-04-16

1.x-dev → 2.x-dev2026-04-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1952412?v=4)[Lara Zeus](/maintainers/atmonshi)[@atmonshi](https://github.com/atmonshi)

---

Top Contributors

[![atmonshi](https://avatars.githubusercontent.com/u/1952412?v=4)](https://github.com/atmonshi "atmonshi (26 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lara-zeus-laravel-seo/health.svg)

```
[![Health](https://phpackages.com/badges/lara-zeus-laravel-seo/health.svg)](https://phpackages.com/packages/lara-zeus-laravel-seo)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[livewire/flux

The official UI component library for Livewire.

9527.8M127](/packages/livewire-flux)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725172.4k14](/packages/tallstackui-tallstackui)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
