setwise / laravel-seo
Setwise's seo generation and display
Requires
- php: ^7.4
- illuminate/config: ^7.0 | ^8.0
- illuminate/database: ^7.0 | ^8.0
- illuminate/http: ^7.0 | ^8.0
- illuminate/support: ^7.0 | ^8.0
- setwise/laravel-forms: ^1.0
Requires (Dev)
- illuminate/testing: ^7.0 | ^8.0
- orchestra/testbench: ^5.0 | ^6.0
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-11-15 07:54:58 UTC
README
This package aims to consolidate all Setwise seo generation into a single, cohesive package.
Installation
Install via the command
composer require setwise/laravel-seo
Configuration
To publish this package's config file use the command
php artisan vendor:publish --tag=setwise-seo-config
Form Components
This package works to provide standard seo components. These blade files can be customized by publishing them to your application using the command:
php artisan vendor:publish --tag=setwise-seo-views
Seo Headings
To apply seo meta tags to your blade file simply put @include(seo::headings)
within your <head></head>
tags.
The headings
blade file pulls its information from the Seo facade created by the application.
If you wish to use a model to populate these fields rather than using the config driven defaults,
simply put the line Seo::setSeoModel($model)
before the heading is rendered, and the model's seo fields will be populated into the page
Seo Field
Because SEO can be applied to many models, a few helper components were created to display the fields
Display Fields
@include('seo::rows', [
'model' => $page,
])
Form Fields
@include('seo::form', [
'seoImageUrl' => route(''),
'seoImageDeleteUrl' => route(''),
])
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.