setwise/laravel-seo

Setwise's seo generation and display

v1.0.2 2020-09-14 22:15 UTC

This package is auto-updated.

Last update: 2024-04-15 06:36:01 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.

Credits