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.
Adopt if:
TransformationResult model) and Laravel’s ecosystem alignment.Look elsewhere if:
*"This updated package supercharges our ability to automate content transformation—like turning raw web content into structured data or visuals—using Laravel’s official AI tools. It’s like upgrading from a niche tool to a first-party Laravel solution, giving us:
For example:
*"This 2.0.0 release replaces Prism with Laravel’s official AI package, requiring Laravel 12+. Here’s what changes and why it’s worth it:
Key Improvements:
ai() helper.What You Need to Do:
Example Workflow (Updated):
// Register a transformer using Laravel AI
Transformer::create()
->forUrl('https://example.com/blog-post')
->use(LdJsonTransformer::class)
->withPrompt(LaravelAI::prompt('Extract Schema.org data from this content: {{content}}'))
->dispatch();
// Query results via Laravel’s AI-aware models
$results = TransformationResult::forUrl('https://example.com/blog-post')->get();
Trade-offs:
Next Steps:
How can I help you explore Laravel packages today?