lee-to / laravel-seo
This package is abandoned and no longer maintained.
No replacement package was suggested.
Laravel seo module
v0.8
2021-05-04 07:29 UTC
Requires
- php: ^7.3
- ext-curl: *
- ext-json: *
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: 8.5.x-dev
README
Install
-
composer require lee-to/laravel-seo
-
php artisan vendor:publish --provider="Leeto\Seo\Providers\SeoServiceProvider"
Usage
- add seo template trait to model
use Leeto\Seo\Traits\Seo
and call in controller
$model->seo();
- in AppServiceProvider
//boot seo()->generate();
- in view
{!! \Seo::meta() !!} {!! \Seo::h1() !!} {!! \Seo::text() !!}
Integration with laravel-admin
- add to admin route
Route::resource('seo', \Leeto\Seo\Admin\Controllers\SeoController::class); Route::resource('seotemplates', \Leeto\Seo\Admin\Controllers\SeoTemplateController::class); Route::resource('redirects', \Leeto\Seo\Admin\Controllers\RedirectController::class);
- add to admin menu
["class" =>\Leeto\Seo\Admin\Controllers\SeoController::class, "title" => "Seo"], ["class" =>\Leeto\Seo\Admin\Controllers\SeoTemplateController::class, "title" => "Seo templates"], ["class" =>\Leeto\Seo\Admin\Controllers\RedirectController::class, "title" => "Redirects"],