michael-rubel / laravel-seo-manager
Provides simple functionality to manage SEO tags based on URL path within your Laravel application.
Fund package maintenance!
paypal.me/observername
Requires
- php: ^8.0|^8.1
- laravel/framework: ^8.71|^9.0
- michael-rubel/laravel-enhanced-container: ^6.0|^7.0|^8.0
- spatie/laravel-package-tools: ^1.10
Requires (Dev)
- brianium/paratest: ^6.3
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^5.10|^6.0
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.6|^7.0
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
README
Laravel SEO Manager
This package provides simple functionality to manage SEO tags based on URL path within your Laravel application.
You can put the URL path available within your app with the JSON of tags you want to get in the view under the specified path. The wildcard *
notation is available as well. You will get the manager variable with tags for each view as a Collection
instance by default. The model to use by the package and variable name is customizable in the config file.
The package requires PHP ^8.x
and Laravel ^8.71
or ^9.0
.
#StandWithUkraine
Installation
Install the package using composer:
composer require michael-rubel/laravel-seo-manager
Publish the migration:
php artisan vendor:publish --tag="seo-manager-migrations"
Publish the config file:
php artisan vendor:publish --tag="seo-manager-config"
Usage
After publishing the config and running migrations, you can apply URLs in the seo_tags
table using following patterns:
/test-url/*
/test-url/my-target
/test-url/any-target/*
Wildcard *
has a lower priority than explicit define.
- Note: If you're going to override the model to use a different database structure, make sure your model implements SeoTagContract. The package uses two simple methods to get the database columns.
Contributing
If you see the way we can improve the package, you're free to open an issue or pull request.
Testing
composer test