spatie/laravel-url-ai-transformer
Laravel package to transform URLs and their web content with AI. Extract structured data (JSON-LD), generate summaries, images, or custom outputs via transformers and prompts. Runs via an Artisan command and stores results in the database for later retrieval.
The transform-urls command processes all registered URL transformations and stores the results in your database.
Run all registered transformations:
php artisan transform-urls
The command provides several options to control which transformations are processed and how they run.
Transform only specific URLs using exact matches or wildcards:
# Transform a specific URL
php artisan transform-urls --url="https://spatie.be/blog"
# Use wildcards to transform multiple URLs
php artisan transform-urls --url="https://spatie.be/*"
# Transform all blog posts
php artisan transform-urls --url="*/blog/*"
Process only specific transformers:
# Transform only with the ldJson transformer
php artisan transform-urls --transformer="ldJson"
# Use wildcards for transformer names
php artisan transform-urls --transformer="image*"
By default, transformers can skip processing using the shouldRun() method. Force them to run regardless:
php artisan transform-urls --force
This is useful when:
By default, transformations are queued for background processing. Run them immediately instead:
php artisan transform-urls --now
How can I help you explore Laravel packages today?