PHPackages                             habib-eg/seo-manager - 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. habib-eg/seo-manager

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

habib-eg/seo-manager
====================

SEO Manager for Laravel Framework

017PHP

Since Mar 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/habib-eg/seo-manager)[ Packagist](https://packagist.org/packages/habib-eg/seo-manager)[ RSS](/packages/habib-eg-seo-manager/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Seo Manager Package for Laravel ( with Localization )
=====================================================

[](#seo-manager-package-for-laravel--with-localization-)

[![MadeWithLaravel.com shield](https://camo.githubusercontent.com/8e353748002216dd171437d46941d5911effb32811699eb61f0c889e234ef13f/68747470733a2f2f6d616465776974686c61726176656c2e636f6d2f73746f726167652f7265706f2d736869656c64732f313133382d736869656c642e737667)](https://madewithlaravel.com/p/seo-manager/shield-link)[![](https://camo.githubusercontent.com/0786c304e8b02c86bbb1db84641ceb2ad7826a49f71b5ccb5e1d55a49769dbed/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f66696c702f77686f6f70732e737667)](https://scrutinizer-ci.com/g/lionix-team/seo-manager/)

`lionix/seo-manager` package will provide you an interface from where you can manage all your pages metadata separately and get dynamically changing content. Let's see how.

Update:
=======

[](#update)

After updating to version &gt; v1.2.\* you have to run:

```
php artisan vendor:publish --provider="Lionix\SeoManager\SeoManagerServiceProvider" --tag=config --force
```

```
php artisan vendor:publish --provider="Lionix\SeoManager\SeoManagerServiceProvider" --tag=assets --force
```

and

```
php artisan migrate
```

to publish latest configs and new migration files.

Localization
------------

[](#localization)

In version v1.2.\* you will have availability to localize your metadata and set translates to your data.

For that, you just should add your available locales with top right button "Add Locales" and chose locale for which you want to add translations.

That's it, Package will automatically detect your locale from website and will set needed translations, you don't need to do any other configs. Easy, isn't it?

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

[](#installation)

You can install the package via composer:

```
composer require lionix/seo-manager
```

Publishing package files

```
php artisan vendor:publish --provider="Lionix\SeoManager\SeoManagerServiceProvider"
```

This command will create `config/seo-manager.php`file and will copy package assets directory to `public/vendor/lionix`.

#### Configurations

[](#configurations)

In `config/seo-manager.php` file you can do the following configurations:

```
return [
    /**
     * Database table name where your manager data will be stored
     */
    'database' => [
            'table' => 'seo_manager',
            'locales_table' => 'seo_manager_locales',
            'translates_table' => 'seo_manager_translates'
        ],

    /**
     * Set default locale,
     * It will be added as default locale
     * when locales table migrated
     */
    'locale' => 'en',

    /**
     * Path where your eloquent models are
     */
    'models_path' => '',

    /**
     * Route from which your Dashboard will be available
     */
    'route' => 'seo-manager',

    /**
     * Middleware array for dashboard
     * to prevent unauthorized users visit the manager
     */
    'middleware' => [
        //  'auth',
    ],

    /**
     * Routes which shouldn't be imported to seo manager
     */
    'except_routes' => [
        'seo-manager',
        'admin'
        //
    ],

    /**
     * Columns which shouldn't be used ( in mapping )
     */
    'except_columns' => [
        // "created_at",
        // "updated_at",
    ],

    /**
     * Set this parameter to true
     * if you want to have "$metaData" variable
     * shared between all views in "web" middleware group
     */
    'shared_meta_data' => false
];
```

After finishing with all configurations run `php artisan migrate` to create SEO manager table.

That's it, now your SEO manager will be available from /seo-manager URL (or, if you changed route config, by that config URL)

Usage
-----

[](#usage)

After visiting your dashboard URL you have to import your routes to start to manage them.

[![routes import](https://camo.githubusercontent.com/321456162b5b93b35e3b78c1416ad3066d35f5b122c5252b8fa33cad2e40ed63/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f5953624674386a76563673776f646a424534786936554350306836734e787730316b456867375975654d6e73754951786d65576f456a42616769593d7732343030)](https://camo.githubusercontent.com/321456162b5b93b35e3b78c1416ad3066d35f5b122c5252b8fa33cad2e40ed63/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f5953624674386a76563673776f646a424534786936554350306836734e787730316b456867375975654d6e73754951786d65576f456a42616769593d7732343030)

Route importing will store all your GET routes into the database ( except the ones which specified in "except\_routes" configs).

[![imported routes](https://camo.githubusercontent.com/bf9bcacf925b851d4c20cb73f2026949a8f39723be04b536bd49a294661aba58/68747470733a2f2f6c68352e676f6f676c6575736572636f6e74656e742e636f6d2f446e2d7475706859714d4e39626d4e5f577a63576d54674f437a757a67336d335f5463576c7a6262374e66377a625648724854426b5863344f34453d7732343030)](https://camo.githubusercontent.com/bf9bcacf925b851d4c20cb73f2026949a8f39723be04b536bd49a294661aba58/68747470733a2f2f6c68352e676f6f676c6575736572636f6e74656e742e636f6d2f446e2d7475706859714d4e39626d4e5f577a63576d54674f437a757a67336d335f5463576c7a6262374e66377a625648724854426b5863344f34453d7732343030)

### Let the fun begin!

[](#let-the-fun-begin)

**Mapping**

[![](https://camo.githubusercontent.com/e56d8a09e021c9ced76ae61c81e4d25dad31fde9944e68113c2e04667eddb1c2/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f6678766f4f5051554739474e694f71416a3643327a375f5a6f6c4d4d4a53562d35334d5f51367350717433667031546459702d39626c4c334451383d7732343030)](https://camo.githubusercontent.com/e56d8a09e021c9ced76ae61c81e4d25dad31fde9944e68113c2e04667eddb1c2/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f6678766f4f5051554739474e694f71416a3643327a375f5a6f6c4d4d4a53562d35334d5f51367350717433667031546459702d39626c4c334451383d7732343030)

To get dynamically changing metadata you should map your route params to the correct Models.

*Param: Route param*

*Model: Eloquent Model which you are using to get the record by route param*

*Find By: Database table column name which you are using to get the record by route param*

*Use Columns: Database table columns which we should use for further mapping*

> **Note**: If you have appended attributes inside your model via `protected $appends` and you want to use them in mapping you have to use `Lionix\SeoManager\Traits\Appends;` trait inside your model.

*Mapping available only if your route has params*

Next steps you can do, is to set Keywords, Description, Title, URL, Author, Title Dynamic, OpenGraph Data.

**About "Title Dynamic":**

Here you can drag &amp; drop your mapped params, your title and write custom text to generate the dynamic title for your page. Every time your "title" will be changed or your mapped params value changed, the dynamic title will be changed automatically.

[![](https://camo.githubusercontent.com/4c855f4274ac65bef87435bac606b93dcc868bde71f6dab2ccb319f91a5ed8df/68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f5667616c4d3838516e6a48386942392d6245633269696b655f31344c625f6346374a4579696c42777142547575444f666f654a76522d6e3635354d3d7732343030)](https://camo.githubusercontent.com/4c855f4274ac65bef87435bac606b93dcc868bde71f6dab2ccb319f91a5ed8df/68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f5667616c4d3838516e6a48386942392d6245633269696b655f31344c625f6346374a4579696c42777142547575444f666f654a76522d6e3635354d3d7732343030)

**About "Open Graph":**

Here you can write your open graph data or map your fields to mapping based on params.

[![](https://camo.githubusercontent.com/23a7b91dc7dc9f4bcc059b4ea0437ddd649280090ece6d1122399d123953991b/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f5a39332d4e55554b4c464f6c655a626a346f5977664535394d4d794778687539534878452d3069414b4e77617457486d3977354c665a5f683572673d7732343030)](https://camo.githubusercontent.com/23a7b91dc7dc9f4bcc059b4ea0437ddd649280090ece6d1122399d123953991b/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f5a39332d4e55554b4c464f6c655a626a346f5977664535394d4d794778687539534878452d3069414b4e77617457486d3977354c665a5f683572673d7732343030)

Example Usage
-------------

[](#example-usage)

Via `SeoManager` Facade
-----------------------

[](#via-seomanager-facade)

```
use Lionix\SeoManager\Facades\SeoManager;
```

##### This will return an array with all your SEO Manager data

[](#this-will-return-an-array-with-all-your-seo-manager-data)

```
SeoManager::metaData();

```

*Example:*

```
array:13 [▼
  "keywords" => "First Keyword, Second, Third"
  "description" => "Test Description"
  "title" => "Test Titile"
  "url" => "http://example.com/users/1"
  "author" => "Sergey Karakhanyan"
  "title_dynamic" => "Test Titile - Custom Text - Test User Name "
  "og:url" => "http://example.com/users/1"
  "og:type" => "website"
  "og:image:url" => "https://wallpaperbrowse.com/media/images/3848765-wallpaper-images-download.jpg"
  "og:title" => "Test Titile - Custom Open Graph Text"
  "og:locale" => "en_GB"
  "og:site_name" => "Seo Manager Package"
  "og:description" => "Open Graph Description"
]
```

`SeoManager::metaData();` method can receive property variable to get the value of some property

*Example:*

`SeoManager::metaData('keywords');` will return `"First Keyword, Second, Third"`

##### To get only OpenGraph data array:

[](#to-get-only-opengraph-data-array)

```
SeoManager::metaData('og_data');
```

*Example*

```
array:7 [▼
  "og:url" => "http://example.com/users/1"
  "og:type" => "website"
  "og:image:url" => "https://wallpaperbrowse.com/media/images/3848765-wallpaper-images-download.jpg"
  "og:title" => "Test Titile - Custom Open Graph Text"
  "og:locale" => "en_GB"
  "og:site_name" => "Seo Manager Package"
  "og:description" => "Open Graph Description"
]
```

##### Aliases

[](#aliases)

`SeoManager::metaKeywords()`

`SeoManager::metaTitle()`

`SeoManager::metaDescription()`

`SeoManager::metaUrl()`

`SeoManager::metaAuthor()`

`SeoManager::metaTitleDynamic()`

`SeoManager::metaOpenGraph()` - Can receive property variable to get the value of some OG property

*Example*

`SeoManager::metaOpenGraph('og:image:url')`

Will return `"https://wallpaperbrowse.com/media/images/3848765-wallpaper-images-download.jpg"`

Via `helper` functions
----------------------

[](#via-helper-functions)

`metaData()`

`metaKeywords()`

`metaTitle()`

`metaDescription()`

`metaUrl()`

`metaAuthor()`

`metaTitleDynamic()`

`metaOpenGraph()`

Via @Blade directives
---------------------

[](#via-blade-directives)

You can use this blade directives in your view files to get metadata.

`@meta`

*Output Example*

```

```

`@meta` can receive property param

`@meta('description')`

*Output Example*

```

```

> **Note:**You can't add open graph properties to `@meta()` like `@meta('og:url')`But you can get only OpenGraph meta data by `@meta('og_data')`. If you want to get concrete OG param meta tag you can use `@openGraph` (*similar to `@meta('og_data')`*) and pass param there like `@openGraph('og:url)`

> **Note #2:** If you want to do modifications in your og data and display it manually, you should do that before `@meta`

*Example:*

```

@meta
```

##### Aliases

[](#aliases-1)

`@keywords`

`@url`

`@author`

`@description`

`@title`

`@openGraph`

`@titleDynamic` - will return dynamically generated title which you can use inside your `` tags.

Contributing
------------

[](#contributing)

### How to start developing on this project

[](#how-to-start-developing-on-this-project)

1. Install the module in a existing Laravel project and check if the module is working.
2. Delete the folder vendor/lionix/seo-manager.
3. Copy the fork of the module in the vendor/lionix/seo-manager folder (don't know how to make a fork? [https://kbroman.org/github\_tutorial/pages/fork.html](https://kbroman.org/github_tutorial/pages/fork.html))
4. Add the following line to your webpack.mix.js `mix.js('vendor/lionix/seo-manager/src/vue/seo-manager.app.js', 'public/vendor/lionix/js');`
5. run the NPM Watch command `npm run watch`
6. If everything works fine, you can start developing on the module
7. **PLEASE REMIND TO COPY YOUR `public/vendor/lionix/js/seo-manager.app.js` TO `vendor/lionix/seo-manager/src/assets/seo-manager.app.js`**

Credits
-------

[](#credits)

- [Sergey Karakhanyan](https://github.com/karakhanyans)
- [Lionix Team](https://github.com/lionix-team)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ff707b6239a22165f764c1749ff4b271b552f2c54ef8477fd8233f07132eaed?d=identicon)[mohamedmosaadhabib](/maintainers/mohamedmosaadhabib)

---

Top Contributors

[![habib-eg](https://avatars.githubusercontent.com/u/25707838?v=4)](https://github.com/habib-eg "habib-eg (2 commits)")[![mohamedhabibwork](https://avatars.githubusercontent.com/u/64292519?v=4)](https://github.com/mohamedhabibwork "mohamedhabibwork (1 commits)")

### Embed Badge

![Health badge](/badges/habib-eg-seo-manager/health.svg)

```
[![Health](https://phpackages.com/badges/habib-eg-seo-manager/health.svg)](https://phpackages.com/packages/habib-eg-seo-manager)
```

###  Alternatives

[cweagans/composer-configurable-plugin

Provides a lightweight configuration system for Composer plugins.

101.9M2](/packages/cweagans-composer-configurable-plugin)

PHPackages © 2026

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