SEO - v1.2.0
Upgrading to 1.2.0
This guide covers upgrading from v1.1.x to v1.2.0. This release is additive — it introduces the AI feature suite without breaking existing APIs.
Summary
- New: Five AI agents for meta title generation, meta description generation, content analysis, JSON-LD schema suggestion, and hreflang gap analysis.
- New: Livewire, React, and Vue trigger components for each agent, plus a shared
useAiAgenthook (React) and composable (Vue). - New:
POST /api/seo/ai/*endpoints for the five agents. - New: Default
seo.ai.useauthorization gate. - Optional:
artisanpack-ui/ai: ^1.0is a suggested dependency — the AI Feature Suite auto-activates only when it is installed. The rest of the SEO package works unchanged on PHP 8.2 / Laravel 10 / Laravel 11.
There are no breaking changes to models, services, contracts, or existing endpoints. Nothing to do if you do not want the AI features.
Update the Package
composer update artisanpack-ui/seo
Install artisanpack-ui/ai (Only If You Want the AI Features)
The AI Feature Suite requires PHP 8.3+ and Laravel 12+ (constraints inherited from artisanpack-ui/ai). If your app is on those versions, install the package:
composer require artisanpack-ui/ai
If you skip this step, the SEO package continues to work — the AI Livewire components (<livewire:seo::ai-*>), AI API endpoints (/api/seo/ai/*), and AI feature registry entries simply are not registered.
Configure AI Credentials
artisanpack-ui/ai needs at least one provider configured before the agents can run. Publish and edit its configuration file:
php artisan vendor:publish --tag=ai-config
Set the credentials for the provider(s) you want to use (e.g. Anthropic, OpenAI). See the artisanpack-ui/ai documentation for provider-specific setup.
Grant the seo.ai.use Ability
Every AI endpoint gates on the seo.ai.use Laravel ability. The service provider ships a default gate that allows any authenticated user; scope it to the roles that should be able to burn AI quota in your own AuthServiceProvider:
use Illuminate\Support\Facades\Gate;
Gate::define( 'seo.ai.use', function ( User $user ) {
return $user->hasRole( 'editor' ) || $user->hasRole( 'admin' );
} );
Publish the Frontend Components (Optional)
If you use the React or Vue admin components, re-run the install command to publish the five new AI components and the useAiAgent hook/composable:
# React
php artisan seo:install-frontend --stack=react --force
# Vue
php artisan seo:install-frontend --stack=vue --force
--force is required if you previously published components — otherwise the new AI components will not be copied. Files you have not modified will be overwritten cleanly.
Optional: Register the Agents in Your UI
The AI features integrate with the SEO Meta Editor by dispatching browser events when they return. The bundled Livewire, React, and Vue admin components pick these events up automatically. If you have a custom editor, wire the components in wherever the corresponding field lives:
<x-artisanpack-input wire:model="form.meta_title" label="Meta Title" />
<livewire:seo::ai-meta-title-suggestor
:content="$form->content"
:primary-keyword="$form->focus_keyword"
:brand="config( 'app.name' )"
/>
See AI Features for the full component and endpoint reference.
Verify
- Confirm
POST /api/seo/ai/suggest-meta-titlereturns a 401/403 when no auth or ability is present, and a 200 withvariantswhen both are present. - Confirm the five features appear in the AI feature registry (
php artisan ai:features). - If you use the frontend scaffolding, confirm
resources/js/vendor/seo/{react,vue}/components/ai/exists and contains the five components.
No Action Required For
- Existing
HasSeomodels,SeoMetarecords, redirects, sitemaps, robots.txt, schema builders, and analyzers. - The existing
/api/seo/*endpoints (meta, analysis, redirects, schema). - Custom analyzers, custom schema builders, and custom sitemap providers.
- Blade components (
x-seo-meta,x-seo-schema, etc.).
Rolling Back
Because 1.2.0 is additive (and only adds a suggested dependency), rolling back is safe:
composer require artisanpack-ui/seo:^1.1
If you also installed artisanpack-ui/ai, you can either leave it in place (it is inert without the SEO agents) or remove it with composer remove artisanpack-ui/ai.
Next Steps
- AI Features — full agent, endpoint, and component reference
- Configuration — configure the SEO package