descom / descommarket-seo
Descommarket SEO
Installs: 3 611
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 1
Requires
- php: ^8.3
- laravel/framework: ^11.0|^12.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- larastan/larastan: ^3.0
- orchestra/testbench: ^9.0|^10.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5|^11.5
This package is auto-updated.
Last update: 2025-04-24 12:57:54 UTC
README
Installation
composer require descom-es/descommarket-seo php artisan migrate
Usage
Configure yor model to use Seo
Add Trait DescomMarket\Seo\Traits
in your Model that required Seo.
Add Seo to your model
$product->addMeta('title', 'new title to product'); $product->addMeta('description', 'Meta description to product');
Get MetaResource to your API
public function toArray($request) { return [ 'id' => $this->id, 'meta' => $this->whenLoaded('meta', new MetaResource($this->meta)), ]; }