PHPackages                             h1ch4m/seo-helper - 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. h1ch4m/seo-helper

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

h1ch4m/seo-helper
=================

seo helper

v1.0.5(1y ago)06MITPHPPHP ^8.0

Since Sep 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Hicham-1/seo-helper)[ Packagist](https://packagist.org/packages/h1ch4m/seo-helper)[ RSS](/packages/h1ch4m-seo-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

SEO Helper
==========

[](#seo-helper)

A Laravel package for SEO functionalities.

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

[](#installation)

You can install the package via Composer:

```
composer require h1ch4m/seo-helper
```

Service Provider
----------------

[](#service-provider)

After installing the package, you need to register the service provider. Add the service provider to your `config/app.php` file:

```
'providers' => [
    // Other Service Providers...

    H1ch4m\SeoHelper\SeoServiceProvider::class,
],
```

Middleware
----------

[](#middleware)

The package includes middleware to handle SEO metadata. You can use this middleware to automatically apply SEO settings to your responses.

### Register Middleware

[](#register-middleware)

To use the middleware, you need to register it in your `app/Http/Kernel.php` file.

#### For Global Middleware

[](#for-global-middleware)

To apply the middleware globally to all routes, add it to the `$middleware` array:

```
protected $middleware = [
    // Other middleware...

    \H1ch4m\SeoHelper\Http\Middleware\SeoMiddleware::class,
];
```

#### For Route Middleware

[](#for-route-middleware)

To apply the middleware to specific routes or route groups, add it to the `$routeMiddleware` array:

```
protected $routeMiddleware = [
    // Other middleware...

    'seo-helper' => \H1ch4m\SeoHelper\Http\Middleware\SeoMiddleware::class,
];
```

You can then use the middleware in your routes like this:

```
Route::middleware(['seo-helper'])->group(function () {
    Route::get('/example', ['ExampleController','show']);
});
```

Publishing Configuration
------------------------

[](#publishing-configuration)

If your package includes configuration options, you can publish the configuration file using Artisan:

```
php artisan vendor:publish --provider="H1ch4m\SeoHelper\SeoServiceProvider"
```

This will publish the configuration file to `config/seo-helper.php`, where you can adjust the settings as needed.

Migration
---------

[](#migration)

run migration to create table `seo-helper`

```
php artisan migrate
```

Usage
-----

[](#usage)

### Adding SEO Metadata

[](#adding-seo-metadata)

You can use the package's API to set SEO metadata for your application. Here's an example of how to use it in a controller:

```
use H1ch4m\SeoHelper\Models\SeoHelper;

public function someMethod()
{
    SeoHelper::insert([
        [
            'name' => 'name',
            'value' => 'author',
            'content' => 'h1ch4m',
            'route' => 'home.index',
            'created_at' => now(),
            'updated_at' => now(),
        ],
        [
            'name' => 'property',
            'value' => 'og:image:width',
            'content' => '256',
            'route' => 'home.index|about.index',
            'created_at' => now(),
            'updated_at' => now(),
        ],
        [
            'name' => 'http-equiv',
            'value' => 'X-UA-Compatible',
            'content' => 'IE=edge',
            'route' => '*', // Wildcard to apply to all routes
            'created_at' => now(),
            'updated_at' => now(),
        ],
    ]);

    // Additional logic...
}
```

Note:

- if you want to apply it on one route just add it on `route` column, if you want to apply it on more than one route use `|` between routes, if you want to apply it on all routes just insert `*`
- The name can be `name` or `property` or any mate name you want
- The value is the meta name value
- The content is the meta content

### Applying Middleware

[](#applying-middleware)

The `SeoMiddleware` will handle SEO settings automatically based on your routes. Ensure you have configured the middleware correctly to apply it to the desired routes.

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

6

Last Release

612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eff0f67f3e9612220cb59a80ef2a290f2b092bcb63caa65b94e2607e92ca73a5?d=identicon)[h1ch4m](/maintainers/h1ch4m)

---

Top Contributors

[![Hicham-1](https://avatars.githubusercontent.com/u/52961783?v=4)](https://github.com/Hicham-1 "Hicham-1 (11 commits)")

### Embed Badge

![Health badge](/badges/h1ch4m-seo-helper/health.svg)

```
[![Health](https://phpackages.com/badges/h1ch4m-seo-helper/health.svg)](https://phpackages.com/packages/h1ch4m-seo-helper)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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