Prism – Seamlessly Integrate LLMs into Your Laravel Applications

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
No comments yet. Be the first to comment.
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling.
Introducing Laravel Cascade Soft Deletes: Efficient Soft Delete Management When developing web applications with Laravel, managing related data across database tables is a critical task. For instance, when deleting a parent record, such as a blog pos...
Daily Tech Brief — 06/08/2026 Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Claude Code 2.1.223 vá nhiều đường обх

Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

🏕️ Arcade Base Camp August 2026 Welcome to Arcade Base Camp August 2026, where you’ll develop key Google Cloud skills and earn an exclusive credential that will open doors to the cloud for you. No pr

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Google Cloud giới thiệu hai Database Operations Agents hỗ trợ onboard

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary SK hynix và Sandisk công bố đặc tả mở đầu tiên cho High Bandwidth Fla

Large Language Models (LLMs) have transformed the landscape of artificial intelligence—enabling everything from smart chatbots and content generation to advanced, AI-driven applications. But integrating different AI providers into your Laravel project can quickly become complex and messy.
Prism is here to simplify that process.
It offers a unified interface to interact with multiple LLM providers like OpenAI, Anthropic, Mistral, and more—allowing you to focus on building AI features, not managing API quirks.
phpCopyEdituse Prism\Prism\Prism;
use Prism\Prism\Enums\Provider;
$response = Prism::text()
->using(Provider::Anthropic, 'claude-3-7-sonnet-latest')
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->asText();
echo $response->text;
Or use the fluent prism() helper for brevity:
phpCopyEditprism()
->text()
->using(Provider::OpenAI, 'gpt-4')
->withPrompt('Explain quantum computing to a 5-year-old.')
->asText();
Unified API Across Providers: Switch between AI providers like OpenAI, Anthropic, and Ollama without rewriting your application logic.
Custom Tooling System: Define tools that can interact directly with your application’s business logic.
Image Support: Work with multi-modal models that can handle both text and images.
Fluent, Laravel-style Syntax: Intuitive and expressive API that feels native to Laravel developers.
Prism currently supports a growing list of major AI providers:
✅ OpenAI
✅ Anthropic
✅ Mistral
✅ Ollama
✅ Groq
✅ DeepSeek
✅ xAI
(and more to come)
⚠️ Note: Some features (like streaming, embeddings, image input, tool calling) may vary depending on the specific model. Check the provider’s documentation for details.
PHP >= 8.2
Laravel >= 11.0
bashCopyEditcomposer require prism-php/prism
📌 Tip: To avoid potential breaking changes, it's recommended to pin to a specific version. Example:
"prism-php/prism": "^0.3.0"
bashCopyEditphp artisan vendor:publish --tag=prism-config
This will generate a config/prism.php file where you can customize providers, default models, API keys, and more.
Prism takes inspiration from the Vercel AI SDK—known for its modern, developer-friendly design—and adapts it beautifully into the Laravel ecosystem. If you’re a Laravel developer, Prism will feel like a natural extension of your toolkit.
If you’re building AI-powered features in Laravel, Prism is the perfect companion to help you:
Move faster
Write cleaner code
Seamlessly switch between AI providers
👉 Try it out today and unlock the full potential of LLMs in your Laravel applications!
For more information and detailed documentation, visit the official Prism website.