Overview Inertia v3 represents a significant evolution in how developers bridge the gap between Laravel and modern frontend frameworks like React and Vue.js. Traditionally, building a Single-Page Application (SPA) required maintaining a complex API layer, managing state across two repositories, and handling authentication twice. Inertia.js solved this by acting as the glue, allowing you to build SPAs using standard server-side routing and controllers. Version 3 takes this developer experience further by stripping away boilerplate and introducing features that were previously left to manual implementation. This update focuses on three core pillars: reducing the footprint of the client-side library, improving the feedback loop during development (especially for Server-Side Rendering), and providing first-class utilities for the modern UI patterns users expect, such as optimistic updates and background HTTP requests. Prerequisites To follow this guide and implement these features, you should be comfortable with the following: * **PHP & Laravel:** Understanding of routes, controllers, and middleware. * **Modern JavaScript:** Familiarity with ES6 syntax and a frontend framework (Vue 3 or React). * **Vite:** Basic knowledge of how Vite handles asset bundling in a Laravel context. * **Inertia Fundamentals:** A baseline understanding of how Inertia.js pages receive data as props from the server. Key Libraries & Tools * Inertia.js v3: The core library and its framework-specific adapters. * Laravel: The recommended backend framework for the Inertia protocol. * Vite: The build tool used to compile assets and run the new Inertia plugin. * Laravel Wayfinder: A tool that provides type-safe routing and form integration between the backend and frontend. * Pest: Used for browser testing, now with better SSR error reporting. Section 1: The New Vite Plugin and SSR Development One of the most immediate changes in v3 is the move toward a cleaner, plugin-driven architecture. In previous versions, your `app.js` entry point was often cluttered with boilerplate code required to resolve components and set up the application. Pascal Baljet explains that the new Vite plugin handles this automatically. Cleaning up app.js Previously, you had to manually define a `resolve` callback to tell Inertia where your page components lived. In v3, the Vite configuration handles this, allowing your entry point to look like this: ```javascript import { createInertiaApp } from '@inertiajs/vue3' import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers' import { createApp, h } from 'vue' createInertiaApp({ setup({ el, App, props, plugin }) { createApp({ render: () => h(App, props) }) .use(plugin) .mount(el) }, }) ``` By including the `@inertiajs/vite-plugin` in your `vite.config.js`, you no longer need a separate `ssr.js` entry point. The plugin detects the environment and serves the correct bundle, drastically reducing file noise in your `resources/js` directory. Real-Time SSR Debugging Server-Side Rendering (SSR) is vital for SEO and initial load performance, but it was notoriously difficult to debug locally. In v3, running `npm run dev` now spins up an SSR development endpoint. When a component fails to render on the server—for example, if you accidentally reference the `window` object in a server-side context—the error is caught and displayed with a full stack trace directly in your terminal and browser. ```javascript // This will now throw a clean SSR error in the console instead of silently crashing export default { setup() { if (typeof window !== 'undefined') { // Browser only code } // If you call window.alert() here, v3 provides a source-mapped error trace } } ``` Section 2: Replacing Axios with useHTTP In a move to make the library leaner, Inertia.js v3 has dropped Axios as a hard dependency. While Axios is powerful, it is often overkill for the specific needs of an Inertia application. By replacing it with a custom XHR implementation, the library shed approximately 100KB from its bundle size. The useHTTP Hook To fill the gap for non-navigational requests (like checking a username's availability or toggling a status without changing pages), v3 introduces the `useHTTP` hook. It mirrors the familiar `useForm` API, making it intuitive for long-time users. ```javascript import { useHTTP } from '@inertiajs/vue3' const http = useHTTP({ username: '', }) const checkAvailability = () => { http.post('/check-username', { onSuccess: (response) => { console.log('Available:', response.data.available) }, }) } ``` Unlike the standard `router.post` or `useForm.post`, this does not trigger a page visit. It returns raw JSON from your controller, allowing for highly interactive UI elements that don't reload the entire page state. Section 3: Native Optimistic Updates Perhaps the most requested feature in the v3 release is built-in support for optimistic updates. In modern web apps, users expect instant feedback. If they click a "favorite" button, the icon should turn red immediately, even if the server takes 200ms to process the request. Implementing Instant Feedback In v3, you can prepend any request with the `.optimistic()` method. This method takes a callback where you define what the props *should* look like assuming the request succeeds. ```javascript import { router } from '@inertiajs/vue3' const toggleFavorite = (id) => { router.optimistic((props) => ({ contacts: props.contacts.map(c => c.id === id ? { ...c, is_favorite: !c.is_favorite } : c ) })).post(`/contacts/${id}/favorite`) } ``` If the server returns an error, Inertia automatically rolls back the state to the previous snapshot. This eliminates the need for developers to manually track "loading" or "pending" states for every single toggle switch in their application. Section 4: Instant Visits and Shared Props Traditional Inertia visits wait for the server to respond with the new page data before performing the navigation. Instant visits change this by navigating to the target component immediately and filling in the data as it arrives. How Instant Visits Work When you use an instant visit, you specify which component to render. Inertia will carry over "shared props"—like the authenticated user or the site name—so the layout renders correctly while the specific page content remains in a loading state. ```javascript router.visit('/profile', { component: 'Profile/Show', // Optionally define specific props to carry over pageProps: (currentProps) => ({ user: currentProps.auth.user }) }) ``` This is perfect for pages where the data fetching is slow but the UI structure is known, giving the user the feeling of a lightning-fast application. Syntax Notes * **Generics for Forms:** The `useForm` hook now supports generics, providing full type-hinting for your form data. This is especially powerful when combined with Laravel Wayfinder. * **Event Renaming:** Several events have been renamed for clarity. `onInvalid` is now `onHTTPException`, and the generic `exception` event is now `onNetworkError` (specific to client-side connectivity issues). * **Layout Prop Access:** A new `useLayoutProps` hook allows page components to pass data directly up to their parent layouts without needing a complex state management library or nested event emitting. Practical Examples 1. **Travel Booking Dashboards:** Use optimistic updates for seat selection or filter toggles where server-side latency is high due to third-party API calls. 2. **Live Search:** Use `useHTTP` to fetch search suggestions in real-time as the user types, without interrupting their scroll position or page state. 3. **Complex Error Pages:** Leverage the new `handleExceptionsUsing` callback in your Laravel AppServiceProvider to render custom 404 or 500 pages that still have access to your shared layout data and authenticated user info. Tips & Gotchas * **The Server Always Wins:** Remember that in optimistic updates, once the real server response arrives, it overwrites the optimistic state. Ensure your frontend logic and backend logic are perfectly synced. * **SSR Awareness:** When using the improved SSR, be careful with third-party libraries that assume a `window` object exists. Use the `onMounted` lifecycle hook to run browser-only code. * **Upgrading:** If your project relies heavily on Axios interceptors for global headers, you must either migrate that logic to Inertia's middleware or manually reinstall Axios and pass it to the `createInertiaApp` configuration as an adapter.
Laravel
Companies
Laravel Daily (5 mentions) highlights new features and integrations, such as the Laravel AI SDK and JsonApiResource for JSON:API, as well as starter kits using FlyonUI CSS.
- Mar 19, 2026
- Mar 18, 2026
- Mar 16, 2026
- Mar 5, 2026
- Feb 25, 2026
Overview Laravel Blaze is a high-performance Blade compiler designed to eliminate the rendering overhead that plagues modern, component-heavy Laravel applications. As developers move away from global Bootstrap styles toward granular Tailwind%20CSS components, the number of Blade components on a single page has exploded. A typical dashboard might render thousands of nested components, leading to server-side bottlenecks where rendering alone takes hundreds of milliseconds or even seconds. Caleb%20Porzio developed Laravel%20Blaze to solve this specifically for the Flux UI library, though it works with any anonymous Blade component. By utilizing advanced compiler techniques like **memoization** and **code folding**, Blaze can reduce rendering times by over 90%, turning a 1.5-second render into a 6-millisecond flash. It accomplishes this by bypassing the heavy lifting Laravel's core engine usually performs—such as container lookups and view resolution—and transforming components into highly optimized PHP functions. Prerequisites To get the most out of this tutorial, you should have a solid foundation in the following: - **Laravel Basics**: Understanding the request lifecycle and service providers. - **Blade Components**: Familiarity with anonymous components, props, and slots. - **PHP Performance Concepts**: A basic understanding of how `opcache` works and why file system lookups are expensive compared to in-memory operations. - **Composer**: Ability to manage packages via the PHP dependency manager. Key Libraries & Tools - Laravel%20Blaze: The core package that provides the optimized compiler and optimization directives. - Livewire: While not strictly required, Blaze is built by the Livewire team and integrates seamlessly with its reactive patterns. - Flux: A UI component library that heavily utilizes Blaze to maintain high performance despite its complex Tailwind%20CSS structure. - **The Blaze Profiler**: A built-in debugging tool that visualizes component render times and folding status. Code Walkthrough: Implementing Blaze Installation and Basic Setup First, pull the package into your project using Composer. Although it is developed by the Livewire team, it is a standalone Laravel package. ```bash composer require livewire/blaze ``` Once installed, you must opt-in your components to the Blaze compiler. You do this by adding the `@blaze` directive at the very top of your component file. ```php {{-- resources/views/components/button.blade.php --}} @blaze <button {{ $attributes }}> {{ $slot }} </button> ``` When you add `@blaze`, the package intercepts the standard Blade compilation. Instead of Laravel generating a file that performs dozens of `app()->make()` and `view()->exists()` calls at runtime, Blaze generates a plain PHP function. This function accepts props and slots as arguments and returns a string, bypassing the overhead of the Laravel Container entirely. Level 2: Component Memoization If your page renders the same component multiple times with the exact same attributes (like a status badge or a specific icon), you can enable **memoization**. This caches the rendered HTML in memory during a single request. ```php {{-- resources/views/components/status-pill.blade.php --}} @blaze @memo(true) <span class="pill-{{ $type }}"> {{ $label }} </span> ``` By adding `@memo(true)`, Blaze creates a static cache key based on the component name and the serialized props. If you render this component 500 times with the same `type` and `label`, PHP only executes the logic once. The other 499 instances are simple string lookups from an internal array. Level 3: Code Folding and Partial Folding The most aggressive optimization is **Code Folding**. This attempts to "pre-render" the component at compile time rather than runtime. If a component is entirely static, Blaze replaces the component call in your parent view with the actual HTML string during the compilation phase. ```php {{-- resources/views/components/icon.blade.php --}} @blaze @fold(true) <svg ...> ... </svg> ``` When Blaze sees this icon in a parent view, it executes the Blade logic once, takes the resulting HTML, and hardcodes that HTML into the cached PHP file. This effectively deletes the component's runtime cost. For components with dynamic parts, Blaze uses **Partial Folding**. It uses a tokenized parser to identify dynamic variables, replaces them with placeholders, renders the static shell, and then re-inserts the dynamic PHP logic into the resulting string. This allows for nearly static performance even when passing a dynamic `$label` to a button. Syntax Notes: The Tokenized Parser Unlike standard Blade, which uses Regex to find and replace tags, Blaze utilizes a custom **Tokenized Parser**. 1. **Tokenization**: It breaks the source code into a flat list of tokens (Tag Open, Tag Name, Attribute, String, Variable). 2. **AST Construction**: It assembles these tokens into an **Abstract Syntax Tree (AST)**. This tree understands that a `flux:button` contains a `flux:icon` as a child. 3. **Transformation**: Blaze traverses the AST. If it finds a component marked for folding, it executes the render logic. 4. **Code Generation**: It spits out the final, optimized PHP file. This structured approach is what allows Blaze to "know" which parts of a component are safe to hardcode and which must remain dynamic. Practical Examples: Boosting a Dashboard Consider a dashboard with 1,000 table rows, each containing an avatar, a status badge, and an action dropdown. - **Without Blaze**: Laravel performs 3,000+ container lookups and merges thousands of attribute bags. This can easily take 150-200ms. - **With Blaze + Memoization**: The avatar and status badge (often repeated) are memoized. The action dropdown is optimized into a function call. Total render time drops to ~15ms. - **With Blaze + Folding**: The SVG icons within the dropdown are folded away. They no longer exist as PHP logic at runtime. Total render time drops to <10ms. Tips & Gotchas - **Static vs. Dynamic State**: Code folding is a "sharp knife." If your component relies on global state (like `auth()->user()`) but you don't pass that state as a prop, the component might fold based on the user who triggered the compilation. Always ensure folded components are pure functions of their props. - **The Profiler**: Use `BLAZE_DEBUG=true` in your `.env`. This adds a floating button to your UI that breaks down exactly how many milliseconds each component took and why it was (or wasn't) folded. - **The @unblaze Directive**: If you have a specific block within a blazified component that must remain dynamic and escape the optimized compiler's logic, wrap it in `@unblaze`. This is useful for validation errors or CSRF tokens that must be unique per render. - **Anonymous Only**: Currently, Blaze only optimizes anonymous Blade components. Class-based components are not yet supported due to the complexity of their lifecycles and constructor logic.
Feb 24, 2026The Sub-Minute Milestone: Architectural Origins The genesis of Laravel%20Cloud began not with a line of code, but with a dinner conversation between Taylor%20Otwell and Joe%20Dixon. The challenge was simple yet daunting: what is an acceptable deployment time for a modern managed platform? The answer—one minute or less—became the north star for the engineering team. Achieving this wasn't merely about optimizing scripts; it required a fundamental reimagining of how infrastructure is provisioned and updated. Building a platform that can take a GitHub repository and turn it into a live, SSL-secured URL in sixty seconds involves a complex dance of container orchestration and global sharding. The engineering team, led by Dixon, split the project into three distinct pillars: the web application interface, the execution environment, and the build system. By establishing strict contracts between these modules, they could develop the components in isolation before merging them into a cohesive whole. This modularity allowed the team to scale from zero to over 2.8 million deployments in just one year. One of the most significant hurdles in this initial phase was the implementation of sharding. To manage a platform at this magnitude, Laravel utilizes hundreds of separate AWS accounts. This strategy, pioneered largely by Chris%20Fidao, ensures that no single point of failure can compromise the entire network. It also allows for granular metering of data transfer and compute usage—a task that remains a constant challenge as the platform evolves to support more complex enterprise requirements. AI Agents and the New DevOps Workflow The integration of Artificial Intelligence into the development lifecycle has transformed Laravel%20Cloud from a passive hosting provider into an active participant in application management. Florian demonstrated this shift through the use of Open%20Claw bots. By leveraging the Laravel%20Cloud%20API, developers can now interact with their infrastructure via conversational interfaces like Telegram. This isn't just about "chatops" gimmickry; it represents a functional shift in how day-two operations are handled. An AI bot with a "Cloud Skill" can reason about application architecture. For instance, when asked how to prepare for production traffic, the bot can analyze current resource metrics and suggest specific upgrades, such as increasing vCPU counts, attaching a MySQL database, or enabling Redis caching. The bot doesn't just suggest these changes; it executes them via the API, confirming the deployment within the chat thread. John%20Nolan, CEO of Ghost, emphasizes that this synergy between Laravel and AI allows small teams to behave like large engineering organizations. By using tools like Claude and Cursor, a single designer-focused developer can ship complex features that previously required a team of five. The stability and "batteries-included" nature of the Laravel framework provide the necessary guardrails for AI to generate reliable, production-ready code. When combined with the sub-minute deployment cycle of the cloud, the feedback loop between idea and reality effectively vanishes. Private Cloud: Isolated Infrastructure for Enterprise As Laravel%20Cloud entered its second half-year, the demand for enterprise-grade isolation led to the development of Private%20Cloud. This offering, managed by James%20Brooks, addresses the specific needs of companies requiring dedicated compute resources and higher compliance standards. Unlike the standard shared clusters, a private cloud instance is a dedicated EKS (Elastic Kubernetes Service) control plane locked to a single organization. The technical advantage of this isolation is profound. It eliminates the "noisy neighbor" effect, where one high-traffic application might impact the performance of others on the same cluster. More importantly for enterprise users, it allows for seamless integration with existing AWS resources via VPC peering or Transit Gateways. A company can keep their massive RDS database in their own AWS account while using Laravel%20Cloud to manage the application layer, getting the benefits of a managed platform without the pain of a full data migration. Private Cloud also introduces features like vanity domains and dedicated outbound IP addresses. This is critical for applications that need to whitelist IPs for third-party API access or maintain a specific brand identity across their internal development tools. By managing the underlying infrastructure, maintenance periods, and security patches, the Laravel team removes the DevOps burden from these large organizations, allowing their engineers to focus strictly on business logic. The Power of Managed Services: Reverb and Beyond A pivotal moment for the platform was the integration of Laravel%20Reverb, the first-party WebSocket server. WebSocket management is notoriously difficult, involving complex load balancing and persistent connection handling. By offering a managed version of Reverb within Laravel%20Cloud, the team turned a complex infrastructure task into a one-click configuration. Joe%20Dixon, who built the Reverb library, notes that the goal was to make real-time features as accessible as standard HTTP requests. On the cloud, Reverb resources can be shared across multiple environments, allowing for a consistent real-time experience from staging to production. This managed approach extends to other critical services like S3-compatible storage buckets and Redis caches, all of which are auto-configured to work with the application's environment variables the moment they are attached in the dashboard. This ecosystem approach is what separates Laravel%20Cloud from generic VPS hosting or even more established serverless platforms. It understands the specific requirements of a Laravel application—the need for a queue worker, the importance of task scheduling, and the necessity of a reliable cache. By automating these specific pieces, the platform ensures that what works on a developer's local machine using Laravel%20Herd will work identically in a distributed cloud environment. Preview Environments: The Collaborative Superpower If there is one feature that the Laravel team and community have identified as a "superpower," it is Preview%20Environments. These are ephemeral instances of an application triggered by a pull request on GitHub. They allow developers, designers, and stakeholders to interact with a specific feature branch in a live environment before it is merged into the main codebase. For freelancers and agencies, this is transformative. Instead of sharing a fragile local tunnel that might expire or break, they can send a stable Laravel.cloud URL to a client. This URL hosts a complete, isolated version of the site, including its own database and cache. Once the PR is merged or closed, the cloud automatically tears down the environment, ensuring cost efficiency. Advanced rules allow teams to control exactly which branches trigger these environments. For example, a team might exclude automated dependency updates from Renovate to avoid cluttering their dashboard, while ensuring every feature branch gets its own staging-like instance. This level of automation significantly reduces the friction in the code review process, allowing for visual regression testing and mobile device testing on real hardware rather than just browser emulators. The Future: Pushing Beyond the 1.0 Horizon One year in, the platform has surpassed 2.8 million deployments, but the roadmap suggests the pace is only accelerating. The transition from Laravel%20Vapor—which uses AWS%20Lambda—to Laravel%20Cloud's container-based architecture has opened new doors for performance and flexibility. While Vapor remains a robust choice for certain serverless use cases, Cloud is becoming the default for developers who want the familiarity of a persistent server with the scalability of a modern cloud-native stack. The next phase of Laravel%20Cloud involves pushing the boundaries of what is possible with managed infrastructure. While the team remains tight-lipped about specific upcoming features, Joe%20Dixon hints at "game-changing" tech currently in development that will further collapse the distance between local development and global deployment. The emphasis remains on developer ergonomics, ensuring that as the platform grows to support the largest enterprises in the world, it never loses the simplicity that makes it accessible to a solo developer with a single idea.
Feb 24, 2026Overview: The Shift to Agentic Development In the current software development landscape, we are moving beyond simple Large Language Models (LLM) wrappers toward sophisticated, autonomous entities known as AI agents. Unlike traditional chatbots that merely respond to prompts, these agents can use tools, access external data, and make decisions to execute complex business workflows. Redberry, a veteran Laravel partner, has formalized this process through LarAgent, an open-source tool designed to bring agentic capabilities directly into the PHP ecosystem. This approach matters because it allows developers to automate non-deterministic tasks—decisions that can't be hard-coded with simple if/else logic—while staying within a framework they already know and trust. Prerequisites To effectively build agentic systems with the tools discussed, you should have a solid grasp of the following: * **Modern PHP & Laravel**: Proficiency in service providers, configuration management, and the Laravel ecosystem. * **LLM Fundamentals**: Understanding of system prompts, temperature settings, and the difference between deterministic and non-deterministic outputs. * **API Integration**: Experience connecting with third-party services, as agents rely heavily on tool-calling to interact with the world. * **Vector Databases & RAG**: A basic understanding of Retrieval Augmented Generation (RAG) for providing agents with custom context. Key Libraries & Tools * **LarAgent**: An open-source package that provides the primitives for building agents in Laravel, including instruction management and tool-calling orchestration. * **Laravel AI SDK**: A first-party toolset from the Laravel team focused on standardizing AI interactions across different providers. * **MCP Client for Laravel**: A specialized package allowing Laravel applications to connect to Model Context Protocol (MCP) servers, giving agents access to an unlimited array of pre-built tools. * **Model Agnostic Layers**: Architectural patterns that allow switching between providers like OpenAI, Anthropic, or local models via configuration. The Anatomy of an AI Agent Sprint Building an agent isn't a linear coding task; it's a process of experimentation. A typical five-week proof of concept (PoC) focuses on time-boxing the non-deterministic nature of the project. Week 1: Discovery and Mapping Before writing code, you must map the business process. The goal is to identify which parts are deterministic (best handled by standard code) and which require an agent. If you can write a rule-based logic for a decision, you should. AI is reserved for the gaps where rules fail. Weeks 2-3: The First Prototype Using LarAgent, developers define the agent's instructions and the tools it can access. A "tool" in this context is often a PHP class or a specific API endpoint the agent can trigger. ```php // Defining a basic agent in LarAgent $agent = LarAgent::make('SupportBot') ->instructions('Assist users with order tracking.') ->tools([ OrderTrackingTool::class, InventoryCheckTool::class ]); ``` During this phase, you establish a benchmark data set. This is a collection of inputs and expected outcomes used to measure the agent's performance. Weeks 4-5: Iteration and Accuracy Initial success rates for agents often hover around 60-70%. The final weeks involve refining prompts, adjusting the orchestration of multiple agents, and tweaking tool definitions to push accuracy toward a production-ready 98%. This often involves "human-in-the-loop" design, ensuring a person reviews critical agent decisions. Syntax Notes & Orchestration Patterns One notable pattern in agentic development is the move away from a single, massive agent toward **multi-agent orchestration**. Instead of asking one agent to "manage an entire warehouse," you might have a "Receiver Agent," a "Stock Agent," and a "Dispatcher Agent." In LarAgent, this is handled through configuration-level model selection. Because different models excel at different tasks, you might use a smaller, faster model for simple categorization and a larger model for complex reasoning. ```php // Configuration-based model selection 'agents' => [ 'categorizer' => [ 'model' => 'gpt-4o-mini', 'temperature' => 0, ], 'analyzer' => [ 'model' => 'claude-3-5-sonnet', 'temperature' => 0.5, ], ] ``` Practical Examples * **Automated Test Case Generation**: Agents can scan project requirements and draft comprehensive test suites, which human developers then verify and approve. * **Legacy System Interfacing**: Using agents to interpret data from legacy systems that lack modern APIs, acting as a conversational or structured bridge between old and new tech. * **Regulated Industry Workflows**: In finance or healthcare, agents can pre-process documents and flag anomalies, significantly reducing manual labor while keeping a human as the final authority. Tips & Gotchas * **Avoid Tool Overload**: Exposing too many tools (more than 10) can overwhelm the LLM, leading to "hallucinations" or incorrect tool selection. Keep the agent's toolkit focused. * **Deterministic First**: Never use AI for something that can be solved with a simple database query or a standard function. It is more expensive and less reliable. * **Benchmark Early**: You cannot improve what you cannot measure. Build your test data set in week one so you have a baseline for every iteration. * **Legacy Blockers**: When integrating with ancient systems, expect blockers. Discovery should prioritize credential and API access to avoid stalling the sprint.
Feb 6, 2026Overview: Why Your AI Agent Needs a Boost AI models like Claude and GPT-4 are powerful, but they arrive at your codebase as strangers. They possess a massive, static library of internet-scale training data, but they lack the specific, real-time context of your unique Laravel application. This gap often leads to what developers call "hallucinations"—code that looks correct but fails to follow your team's conventions or uses deprecated patterns. Laravel Boost is designed to solve this context deficiency. It acts as a bridge, packaging your application's routes, configuration, and coding standards into a format that AI agents can ingest and act upon. With the release of Boost 2.0, the focus has shifted from merely providing static instructions to implementing dynamic **Skills** and the **Model Context Protocol (MCP)**. This evolution allows developers to manage the "Context Window"—the finite memory of an AI model—with surgical precision, ensuring the agent only sees what it needs to see to complete a specific task. Prerequisites: Setting the Stage To effectively implement Laravel Boost 2.0, you should have a baseline understanding of the following: * **Modern PHP & Laravel**: Familiarity with PHP 8.2 and Laravel 12 is essential, as Boost 2.0 has moved away from supporting older versions to utilize the latest framework features. * **AI Coding Tools**: You should be using an AI-capable editor or agent such as Claude Dev, Cursor, GitHub Copilot, or Windsurf. * **Command Line Basics**: You will need to interact with the terminal to run Artisan commands for installation and synchronization. Key Libraries & Tools * **Laravel Boost**: The core package that manages guidelines, skills, and the MCP server for AI integration. * **Laravel MCP**: A foundational package that implements the Model Context Protocol, allowing external systems (like your app) to communicate with AI models. * **Composer**: Used for managing dependencies and third-party AI skills. * **MCP Inspector**: A utility for debugging the connection between your editor and the MCP server. Code Walkthrough: Installation and Configuration Setting up Laravel Boost 2.0 is a methodical process. It begins with a standard installation and moves into configuring how the AI interacts with your files. Step 1: Installation Run the following command in your project root: ```bash composer require laravel/boost --dev php artisan boost:install ``` During installation, the CLI will prompt you to select which AI agents you are using (e.g., Cursor, Claude). This is critical because each agent looks for context in different locations—Cursor uses `.cursorrules`, while others might look for `agents.md`. Step 2: Synchronizing Skills and Guidelines Whenever you update your configuration or add custom rules, you must run the update command to rebuild the context files that the AI reads: ```bash php artisan boost:update ``` This command scans your `AI/guidelines` and `AI/skills` directories, composing a unified markdown file (like `claudedev.md`) that represents the current state of your project's rules. Step 3: Customizing Business Logic One of the most powerful features of Boost 2.0 is the ability to inject custom business context. You can publish the configuration file to unlock this: ```bash php artisan vendor:publish --tag=boost-config ``` Inside `config/boost.php`, you can add a `purpose` key. This is where you tell the AI exactly what the app does—for example, "This project is a logistics platform for tracking international shipping containers." ```php return [ 'purpose' => 'A financial dashboard for tracking cryptocurrency tax compliance.', 'coding_style' => 'Spatie', // ... other config ]; ``` Syntax Notes: The Architecture of a Skill A **Skill** in Boost 2.0 is a specialized markdown file that the AI can "invoke" only when needed. This prevents the context window from being cluttered with irrelevant information. The syntax follows a specific pattern: ```markdown Name: Inertia Vue Development Description: Use this skill when building or modifying Vue components within the Inertia.js stack. Implementation Guidelines - Always use the <script setup> syntax. - Utilize Tailwind CSS for all styling. - Ensure all components are stored in the resources/js/Pages directory. ``` The AI reads the `# Description` to decide if the skill is relevant to your current prompt. If you ask to fix a CSS bug, it will pull in the **Tailwind Skill** but ignore the **Database Skill**, saving thousands of tokens. Practical Examples: Real-World Agent Workflows Automated Refactoring with Verification Don't just ask an AI to refactor code; ask it to verify its work using the tools provided by Laravel Boost. A high-level prompt might look like this: "Refactor the `OrderController@store` method to use a Form Request. Use the **Laravel Skill** for validation patterns. Once completed, use the **Tinker Tool** via MCP to create a test order and ensure the database record is created correctly." Documentation Ingestion If you are using a new package that the AI hasn't been trained on, you can use the `search_docs` tool provided by the Boost MCP server. The agent can query the latest Laravel documentation in real-time to find the correct syntax for Laravel 12 features like Pest integration or the newest Inertia helpers. Tips & Gotchas: Navigating the AI Frontier * **The Context Trap**: Be careful not to put too much in your `guidelines`. If your `agents.md` file becomes 10,000 lines long, the AI will lose the thread of your conversation. Move specific package logic into **Skills** so they are only loaded on demand. * **Plan Mode First**: Always use "Plan Mode" in your AI editor before letting it write code. This allows the agent to outline its approach based on the Boost guidelines before it commits to a file structure. * **Sync Often**: If you change a route name or a config value, run `php artisan boost:update`. If you don't, the AI will be working from a "ghost" version of your app's previous state. * **Override Wisely**: Boost comes with sensible defaults for Tailwind and Pest. However, if your team has a unique way of writing tests, create a custom file in `AI/skills/pest.md` to override the default Laravel Boost behavior.
Jan 28, 2026The Evolution of the Laravel Deployment Ecosystem For years, the gold standard for deploying Laravel applications involved Laravel Forge, a tool that revolutionized how developers interact with raw virtual private servers. However, as applications scale and architectural complexity grows, the mental tax of managing individual servers—even with automation—begins to outweigh the benefits. Laravel Cloud represents a shift from server management to application orchestration. It abstracts the underlying Kubernetes infrastructure, allowing developers to focus strictly on code while the platform handles the intricacies of scaling, networking, and resource isolation. Moving to a managed cloud environment isn't just about convenience; it's about shifting resources. When you spend forty hours deep-diving into infrastructure rather than product features, you're incurring an opportunity cost. The core philosophy here is simple: if the goal is to ship a scalable product without hiring a dedicated DevOps team, the infrastructure must be intelligent enough to manage itself. This transition requires a mindset shift from a "server-based" mentality to a "pod-based" mentality, where resources are allocated based on what the application needs, rather than what the operating system requires to stay alive. Architecting for Scale: Infrastructure as a Canvas The Laravel Cloud interface utilizes a "canvas" approach to infrastructure design. This visual representation places networking on the left, compute in the center, and resources like databases and caches on the right. This isn't just aesthetic; it mirrors the actual transit of traffic through an application's ecosystem. One of the most significant advantages of this model is the ability to decouple web traffic from background processing. In a traditional Laravel Forge setup, an application and its queue workers often fight for the same CPU and RAM on a single box. On the cloud canvas, you can spike out your **App Compute** from your **Worker Compute**. This allows for granular optimization. If your admin panel sees low traffic but your background webhooks are processing thousands of jobs per second, you can scale your worker pods horizontally to ten replicas while keeping your web pod on a single, tiny instance. This separation ensures that a massive spike in background jobs never degrades the user experience on the front end. Furthermore, features like **Q Clusters** introduce intelligent scaling. Rather than scaling based on raw CPU usage—which can be a lagging indicator—Q Clusters scale based on queue depth and throughput. If the delay between a job being queued and picked up exceeds twenty seconds, the system automatically spins up more replicas to meet the demand. The Power of Preview Environments and Rapid Feedback One of the most praised features in the modern developer workflow is the **Preview Environment**. By integrating directly with GitHub, GitLab, or Bitbucket, Laravel Cloud can automatically replicate an entire application ecosystem whenever a Pull Request is opened. The system issues a unique, random URL where stakeholders can view changes in real-time. This eliminates the "pull the branch and run it locally" bottleneck that often slows down non-technical team members like designers or project managers. These environments are ephemeral by design. The moment a PR is merged or closed, the resources are destroyed, ensuring you only pay for the minutes or hours the environment was active. This tightens the feedback loop significantly. For agencies working with external clients, it provides a professional, live staging area for every feature branch without the risk of polluting a primary staging server with conflicting code. While these currently utilize random subdomains due to the complexities of automated DNS management, the utility they provide in a collaborative environment is unmatched in the traditional VPS world. Understanding the Economic Model and Pricing Optimization A common concern when moving from a $6 VPS to a managed cloud is the "industry price." While a raw server is undeniably cheaper at the entry level, the comparison often fails to account for the overhead of management and the inefficiencies of vertical scaling. Laravel Cloud uses a consumption-based model, often starting with a pay-as-you-go structure that eliminates high monthly subscription fees for smaller projects. The key to staying cost-effective lies in features like **Hibernation**. For development sites or low-traffic admin tools, hibernation allows pods to go to sleep after a period of inactivity—say, two minutes. When a pod is hibernating, you stop paying for the compute resources. If a request hits the URL, the system wakes the pod back up. Additionally, developers often over-provision because they are used to VPS requirements. On Laravel Cloud, you don't need to provision RAM for the OS, Nginx, or Redis if those are running as separate managed resources. You only provision what the PHP process itself needs. By right-sizing pods and utilizing hibernation, many developers find their cloud bill remains surprisingly low even as they gain the benefits of a high-availability architecture. Deployment Mechanics: Build vs. Deploy Commands To effectively use Laravel Cloud, one must understand the two-phase deployment process: **Build** and **Deploy**. Because the system is Kubernetes-based, it creates an immutable image of your application. The **Build Commands** are executed while that image is being constructed. This is the time for `composer install`, asset compilation, and caching configurations. Crucially, commands like `config:cache` should happen here so they are baked into the image that will be distributed across all replicas. **Deploy Commands**, conversely, run exactly once when that new image is being rolled out to the cluster. This is the designated home for `php artisan migrate`. Because the infrastructure handles zero-downtime deployments by standing up new healthy pods before draining old ones, you no longer need legacy commands like `queue:restart` or `horizon:terminate`. In a containerized world, those processes are naturally terminated when the old pod is killed and replaced by a fresh one. This architectural shift simplifies the deployment script and removes the risk of stale code persisting in long-running processes. Enterprise Requirements: Private Clouds and Persistence For applications with strict compliance or bespoke networking needs, the **Private Cloud** offering provides an isolated environment. This allows for **VPC Peering**, enabling Laravel Cloud applications to talk privately to existing AWS resources like Amazon Aurora or RDS. This is critical for organizations migrating large, existing workloads that cannot yet move their entire data layer into a managed cloud environment. Data persistence also changes in a cloud-native setup. Since pods are ephemeral, you cannot rely on the local file system for user uploads. Laravel Cloud encourages the use of object storage, such as Cloudflare R2 or Amazon S3, which provides much higher durability and global availability than a single server's disk. By abstracting these services through the Laravel Filesystem API, the transition is seamless for the developer, while the application gains the ability to scale infinitely without worrying about disk space or file synchronization between multiple web servers.
Jan 24, 2026The Architecture of Inclusion Visibility acts as a silent catalyst in the software development world. When we look at the Laravel ecosystem, we see a vibrant, fast-moving framework that has revolutionized the way we build web applications. However, for a long time, the faces representing this progress were strikingly uniform. Zuzana Kunova recognized this gap not as a lack of talent, but as a lack of connection. She founded Larabelles to serve as a sanctuary and a megaphone for developers who are underrepresented due to their gender. This isn't just about diversity for the sake of a checklist; it’s about ensuring that the tools we use to build the modern web are shaped by the diverse hands that use them. In our industry, the concept of a "safe space" is often misunderstood. It isn't about exclusion; it's about providing a low-friction environment where developers can ask questions without fear of judgment. Technical forums like Stack Overflow can be notoriously hostile, and for a woman or non-binary developer who is already feeling the weight of the "imposter syndrome" that plagues tech, one snide comment can be enough to drive them away. Larabelles provides a counter-narrative. It creates a community where the default state is kindness and the primary goal is mutual elevation. From Career Pivots to Community Leadership The origin of this movement is deeply personal. Both Zuzana and Leah Thompson took non-traditional paths into software engineering. Zuzana moved from psychology and shipping into tech, while Leah transitioned from teaching high school mathematics. These stories are vital because they break the myth that you must be a "math prodigy" or a lifelong tinkerer to succeed in code. By the time Zuzana reached the Laravel space roughly eight years ago, she found herself searching for others who looked like her. The community was friendly, but the representation was near zero at physical meetups. This isolation led to a simple, life-changing question on social media: Does a community for women in Laravel exist? The answer was a resounding "no," followed by a challenge to create it. This is how the most impactful tools in our industry are born—out of a necessity to solve a personal problem that turns out to be universal. The initial goal was modest—finding friends and validating one’s existence in a room full of men. Today, that small search for connection has evolved into a global network that provides mentorship, financial aid, and a loud, clear voice in the PHP world. Tangible Impact: Scholarships and the Directory One of the most effective ways to change the face of a community is to change who is in the room at major events. Conferences like Laracon are the heartbeat of the ecosystem. They are where jobs are found, partnerships are formed, and reputations are built. However, the cost of attendance—including tickets, travel, and lodging—can be a massive barrier. Larabelles tackles this head-on through its scholarship initiatives. By using sponsorship funds to send members to conferences like Laracon India or Laracon EU, they are directly placing underrepresented developers in the center of the conversation. Beyond the financial aspect, the Larabelles Member Directory serves as a direct rebuttal to the "pipeline problem" excuse. When organizers claim they can't find women speakers, or companies claim they can't find diverse talent to hire, the directory provides a list of over 80 qualified professionals ready to contribute. This transparency is key. It moves the conversation from abstract ideals to concrete action. It says: "We are here, we are skilled, and here is how you contact us." This initiative, supported by Diana Scharf and others, ensures that being "quiet" doesn't mean being "invisible." The Ripple Effect of Mentorship Mentorship within Larabelles often functions like an organic matchmaking service. Rather than a rigid, corporate program, it relies on the deep institutional knowledge of its founders and long-term members. Because the community is intimate enough for leaders to know individual strengths, they can pair junior developers with senior mentors with high precision. This is how we combat the high attrition rates for women in tech. It isn't enough to get someone their first job; we have to provide the support structure that helps them reach senior positions and leadership roles. Leah's own journey from a scholarship winner to a DevRel engineer at Laravel is a prime example of this success. It demonstrates that when you remove the barriers to entry, talented people don't just participate—they lead. This cycle of success creates a feedback loop. Every time a Larabelles member speaks on a main stage or contributes to a major open-source package, they become a beacon for the next generation. They prove that the space is not just "available" to them, but that they can thrive within it. Why Diversity is a Technical Necessity We must address the "why" behind diversity from a technical standpoint. If software is built by a monoculture, it will inevitably reflect the blind spots of that group. History is full of examples where lack of diversity led to flawed products, from seatbelts designed only for male bodies to facial recognition software that fails on non-white faces. In the world of web development, our products touch every aspect of human life. If we aren't including different perspectives in the design and engineering phase, we are failing our users. Diversity in Laravel means better content, more creative solutions, and more robust applications. A developer who has spent a decade in a different industry brings a unique problem-solving framework to a codebase. A parent juggling childcare and coding brings a different perspective on UI/UX efficiency. When we invite everyone to the table—using the "Pac-Man principle" of leaving room in the circle for others—the entire ecosystem becomes more innovative. We aren't just doing this because it's the "right thing to do"; we're doing it because it produces better software. The Future: Merch, Podcasting, and Beyond Looking forward, the roadmap for Larabelles is ambitious. It involves moving beyond the digital confines of Discord and into the broader public consciousness. A new podcast is in the works, designed to give a platform to every member, regardless of their "fame" or tenure. This lowers the stakes for public speaking and helps developers build their "proven track record" in a supportive environment. It’s about building confidence as much as it is about building a resume. Physical visibility is also on the horizon. The upcoming merchandise—hoodies, t-shirts, and perhaps even the much-requested scrunchies—serves a dual purpose. It acts as a fundraiser for the non-profit's scholarship fund and creates a sense of belonging at events. When you see someone wearing the Larabelles logo (affectionately debated as being either an 'L', a fingerprint, or even a duck), you know you’ve found a friend. That instant connection is the antidote to the awkwardness of being the only person in a room who doesn't fit the traditional mold. Sustaining the Momentum The survival of this community depends on the continued support of the broader tech world. As a non-profit, Larabelles relies entirely on sponsorships and donations. This is a call to action for companies and individuals who have benefited from the Laravel framework to give back. Supporting this community is an investment in the health and longevity of the ecosystem. It ensures that the talent pool remains deep, diverse, and vibrant. For those who feel alone in their local tech scenes, the message is clear: join the Discord, sign up for the newsletter, and apply for that conference ticket even if you think you won't win. The community is only as strong as its members, and there is space for everyone. We are moving toward a future where being a woman in tech isn't a "statistical anomaly" but a standard part of the landscape. Through the work of Larabelles, that future is being coded one connection at a time.
Jan 9, 2026Overview Laravel recently introduced the `JsonApiResource` class in version 12.45, a significant update that aligns the framework with the official JSON:API specification. Historically, Laravel utilized an opinionated, flat structure for its Eloquent resources. This new feature allows developers to serve data in a standardized format that includes specific keys like `type`, `id`, and `attributes`, making it easier for standardized frontend clients to consume backend data without custom mapping. Prerequisites To follow this guide, you should have a baseline understanding of PHP and the Laravel framework. Familiarity with REST APIs and Postman for testing endpoints is recommended. You must be running Laravel 12.45 or higher to access the new resource class. Key Libraries & Tools * **Laravel Framework**: The core PHP framework providing the new API features. * **JSON:API Specification**: The industry-standard protocol for building APIs in JSON. * **Postman**: A tool used to visualize and test the differences between standard and JSON:API responses. Code Walkthrough Instead of extending the usual `JsonResource`, you now extend `JsonApiResource`. This small change fundamentally reshapes the output. ```php use Illuminate\Http\Resources\Json\JsonApiResource; class PostResource extends JsonApiResource { public function toArray($request) { return [ 'id' => $this->id, 'title' => $this->title, 'slug' => $this->slug, 'category' => new CategoryResource($this->whenLoaded('category')), ]; } } ``` In the standard `JsonResource`, the fields like `title` and `slug` appear at the top level of the `data` object. However, when using `JsonApiResource`, Laravel automatically nests these fields under an `attributes` key and extracts the `id` and `type` to the top level. This satisfies the strict requirements of the JSON:API spec without requiring you to manually rebuild the array structure. Global Configuration You can configure global metadata for your JSON:API implementation within the `AppServiceProvider` or a dedicated provider. This allows you to set versioning or extensions that apply to all resources. ```php use Illuminate\Http\Resources\Json\JsonApiResource; public function boot() { JsonApiResource::configure( version: '1.1', meta: ['api_status' => 'stable'] ); } ``` Syntax Notes The `JsonApiResource` class uses internal logic to wrap your `toArray` return values. While your resource file looks familiar, the framework post-processes the array to move everything into the `attributes` block unless it matches the reserved keys for `id`, `type`, or `relationships`. Tips & Gotchas One common point of confusion is the versioning string in the configuration. While the JSON:API website currently highlights versions 1.1 and 1.2, Laravel allows you to pass custom strings. Always verify your frontend client's expectations before hardcoding a version like `2.0` in your service provider.
Jan 8, 2026Overview Building modern web interfaces often feels like a forced march toward JavaScript frameworks. Many developers just want the power of Laravel Blade templates without the overhead of React or Vue. The FlyonUI Starter Kit fills this gap. It provides a pre-configured environment that merges the elegance of Tailwind CSS with a robust set of FlyonUI components. This allows for a rich, interactive dashboard experience while keeping the backend logic strictly within PHP. Prerequisites To effectively use this kit, you should have a solid grasp of: - **Laravel 12**: Familiarity with routing, controllers, and Blade syntax. - **Tailwind CSS**: Understanding utility-first styling. - **Composer & NPM**: Essential for managing PHP dependencies and asset bundling. Key Libraries & Tools - **Laravel 12**: The core framework providing the application skeleton. - **FlyonUI**: A headless UI component library that uses Tailwind CSS classes to deliver components like modals, accordions, and tables. - **Tailwind CSS**: The underlying styling engine. - **Vite/NPM**: Handles the compilation of assets and integration of JavaScript functionality. Code Walkthrough Installation You can spin up a new project using the Laravel installer by targeting the specific repository. Use the following terminal command: ```bash laravel new my-app --github="LaravelDaily/flyonui-starter-kit" ``` The Frontend Architecture In the `resources/views/layouts/app.blade.php` file, you will notice that FlyonUI components are integrated directly via standard HTML classes. Unlike Headless UI, these feel more like Bootstrap in their simplicity. ```html <!-- Example of a FlyonUI Button in a Blade file --> <button class="btn btn-primary"> Click Me </button> ``` In the `dashboard.blade.php` file, the kit implements a multi-level navigation system using standard Blade directives and FlyonUI classes to handle state and visibility without custom JS scripts. Syntax Notes FlyonUI relies heavily on specific utility classes that resemble traditional CSS frameworks. For example, using `btn` and `btn-primary` triggers complex Tailwind CSS layers under the hood. It also utilizes a CDN-based JavaScript approach for interactive components by default, though you can migrate this to an NPM-managed workflow within `app.js`. Practical Examples This kit is perfect for **Internal Admin Panels** where developer speed is more critical than complex client-side state management. It is also an excellent choice for **SaaS MVPs** that need a professional look immediately upon registration without the complexity of an Inertia.js stack. Tips & Gotchas Be mindful of the JavaScript dependencies. While the CSS is pure Tailwind, some components like dropdowns require the FlyonUI JS script to function. If you notice UI elements not responding, check that the script is properly linked in your main layout file. Always refer to the FlyonUI documentation when extending the kit, as certain components require specific nested HTML structures to render correctly.
Jan 6, 2026Overview Hard-coding URLs in your frontend components is a fragile practice. When a route changes in your Laravel backend, your Vue or React components break silently. Laravel Wayfinder solves this by generating TypeScript functions for your routes. This gives you autocomplete, type checking, and instant feedback directly in your frontend IDE, ensuring your application remains perfectly in sync. Prerequisites To get the most out of this guide, you should be comfortable with: - Laravel basics (Routing and Controllers) - Modern frontend development (Vite and TypeScript) - Inertia.js (helpful but not strictly required) Key Libraries & Tools - **Laravel Wayfinder**: The core package that maps backend routes to frontend assets. - **Artisan**: The Laravel CLI used to trigger the generation process. - **Vite**: Can be configured to automate route regeneration during development. Code Walkthrough 1. Generating Route Definitions Run the generator command to scan your `routes/web.php` file and create the necessary TypeScript files. ```bash php artisan wayfinder:generate ``` This creates an `actions` and `routes` directory inside `resources/js`. These directories contain functions mapped to your controllers and named routes. 2. Implementing in a Component Instead of passing a string like `"/demo/show"` to a link, import the generated helper function. Wayfinder provides an object containing both the `url` and the HTTP `method`. ```typescript import { show } from '@/actions/Http/Controllers/DemoMethodController'; // Use directly with Inertia Link <Link :href="show().url">View Details</Link> ``` 3. Using Named Routes and Invocable Controllers Wayfinder handles all route types. For named routes, it nests helpers based on the dot-notation name. ```typescript import { named } from '@/routes/demo'; const routeData = named(); // Returns { url: '/demo/named', method: 'GET' } ``` Syntax Notes Wayfinder uses a **namespaced directory structure** for actions. If your controller lives in `App\Http\Controllers\Api`, your TypeScript import will mirror that path. This makes finding the correct route helper intuitive for anyone familiar with the backend structure. Practical Examples - **Dynamic Navigation**: Generate a sidebar menu where links are automatically updated if the backend URI changes. - **Form Submissions**: Use the `.method` property from the helper to ensure your frontend `axios` or `fetch` calls always use the correct HTTP verb (POST vs PUT) defined in Laravel. Tips & Gotchas - **Automate with Vite**: Add the Wayfinder plugin to your `vite.config.js` so that routes regenerate every time you save a PHP file. - **Inertia Compatibility**: When using Inertia.js, you can often pass the entire Wayfinder object to the `Link` component, and it will automatically extract the URL.
Dec 20, 2025Modern development thrives on context. Laravel Boost bridges the gap between your local environment and AI intelligence by providing precise guidelines for the Laravel ecosystem. The package recently moved through several iterations, focusing on accessibility for package authors and broader editor support. Here are the latest updates making your AI interactions more accurate. Automated Ecosystem Updates The introduction of the `boost update` command ensures your development environment remains in sync with the rapidly changing Laravel landscape. Running this command fetches the latest official guidelines for core packages, preventing your AI from suggesting outdated syntax or deprecated methods. It also re-indexes any custom rules stored in your `.ai` folder, maintaining a single source of truth for project-specific logic. Guidelines for Package Authors Laravel Boost now empowers third-party package creators to ship their own AI instructions. By adding a `resources/boost/guidelines/core.blade.php` file to a package, authors ensure that any developer using Laravel Boost automatically inherits the correct implementation patterns. This decentralizes guideline creation, allowing experts to define how AI should handle their specific tools. Expanded Editor and Environment Support Compatibility is key for tool adoption. While Laravel Boost initially focused on Cursor and VS Code, version 1.7 adds official support for Open Code. For developers working in niche environments, a new extensible code environment class allows for manual registration of any IDE or AI agent, essentially making the package platform-agnostic. Simplified Markdown Integration Complexity often kills utility. Previously, custom guidelines required Blade templates, which added unnecessary overhead for simple text instructions. A new quality-of-life update allows developers to use standard Markdown files within the `.ai/guidelines` directory. This shift makes it easier to quickly jot down project rules without worrying about templating syntax. Laravel Boost remains in beta, but its integration with tools like Tailwind 4 and Wayfinder proves it is already indispensable for modern workflows. As the team expands, expect even deeper AI synchronization.
Nov 12, 2025