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.
Leah Thompson
People
The Laravel channel features Leah Thompson in 14 mentions, emphasizing her technical authority in 'Laravel Cloud Office Hours' and 'Inertia v3 Deep Dive' regarding cloud-native transitions.
- Mar 19, 2026
- Mar 13, 2026
- Feb 21, 2026
- Feb 13, 2026
- Feb 11, 2026
The Shift to Managed Infrastructure Software deployment historically forced developers into a binary choice: either manage the raw metal and virtual machines themselves or surrender control to abstract serverless platforms. Laravel Cloud represents a middle ground that prioritizes the developer experience while maintaining the power of industry-standard container orchestration. During a recent technical session, Leah Thompson and Devon Garbalosa addressed the growing curiosity surrounding this platform, specifically how it handles the complex needs of enterprise-grade applications. The core philosophy behind the service is to provide a fully managed environment that removes the friction of server management. Unlike traditional VPS setups where a developer must manually patch the operating system or configure Nginx, this platform treats the application as an image. This container-centric approach ensures that if a build succeeds, the deployment will remain healthy, regardless of the underlying hardware's status. By moving away from the "snowflake server" model, developers can focus on writing logic rather than debugging configuration drift. Preview Environments and Collaborative Workflows One of the most friction-heavy parts of the modern development lifecycle is the feedback loop between writing code and stakeholder review. Traditionally, this required manual deployment to a staging server or recorded walkthroughs. The introduction of **Preview Environments** changes this dynamic by automating the infrastructure lifecycle around GitHub pull requests. When a developer opens a PR, the system can automatically replicate the production environment, including the database schema. This isn't just a static site; it is a live, functional version of the application running on unique, ephemeral URLs. This allows marketing teams, QA engineers, and project managers to interact with new features in a real-world context before a single line of code is merged into the main branch. Once the PR is closed or merged, the platform intelligently spins down the associated resources—including dedicated database instances—to ensure cost efficiency. For teams burdened by the administrative overhead of managing multiple UAT servers, this automation represents a significant reduction in technical debt. Private Cloud and Enterprise Isolation While shared infrastructure suits many use cases, enterprise requirements often demand higher levels of isolation. Devon Garbalosa detailed how the **Private Cloud** tier addresses these needs by creating a dedicated AWS account and VPC for a single organization. This isn't just about performance; it's about network security and compliance. By running on a private network, companies can implement **VPC peering** or **Transit Gateway** connections to link their Laravel Cloud resources with existing legacy infrastructure. This is critical for applications that need to communicate with on-premise databases or proprietary internal services without exposing traffic to the public internet. Furthermore, the private tier provides advanced Web Application Firewall (WAF) features and custom domain management for autogenerated URLs, ensuring that even internal preview links adhere to corporate branding and security protocols. Navigating the Vapor to Cloud Migration A major point of discussion in the community involves the relationship between this new offering and Laravel Vapor. While Vapor is built on AWS Lambda (serverless functions), Laravel Cloud utilizes EKS (Elastic Kubernetes Service). This architectural shift has profound implications for cost and performance. Devon Garbalosa noted that while Vapor remains a supported product with a specific niche for hyper-scale serverless needs, many customers find better value in the new container-based approach. The primary reason is cost predictability. Lambda pricing scales linearly with every request, which can lead to "sticker shock" during traffic spikes or DDoS attacks. In contrast, the EKS-backed infrastructure allows for more stable resource allocation. Early migration data suggests that teams moving from Vapor to the new platform are seeing cost reductions of 20% to 30%, with some reporting savings exceeding 50% due to more efficient resource utilization. Compliance, Security, and Global Reach Security is often the deciding factor for moving to a managed service. The platform has proactively pursued rigorous certifications to satisfy legal departments. Currently, it boasts **SOC 2 Type II** and **GDPR** compliance, with **ISO 27001** and **HIPAA** support on the immediate roadmap. For European and South American customers, the regional availability of data centers is paramount. The team recently added a UAE region and continues to evaluate new locations like India and Tokyo based on user demand. Beyond legal compliance, the platform includes built-in DDoS mitigation by default. This is a crucial distinction from other services where security layers are often an expensive opt-in. By integrating these protections at the edge—utilizing Cloudflare's network for caching and traffic filtering—the platform ensures that applications remain resilient against malicious traffic without requiring the developer to become a security expert. Automation via the Cloud API The future of the platform lies in extensibility. The upcoming release of a general-purpose **Cloud API** will allow developers to programmatically manage their infrastructure. This opens the door for custom CI/CD integrations, automated scaling based on proprietary business metrics, and even AI-driven orchestration. For example, a developer could write a script to spin up a temporary environment for a heavy data-processing task and then terminate it immediately upon completion, all via API calls. This level of control, combined with the recently launched Laravel AI SDK, suggests an ecosystem where the infrastructure and the code are increasingly aware of each other, leading to smarter, more efficient deployments. Conclusion: The Path Forward Laravel Cloud is not just another hosting provider; it is an evolution of how the PHP community interacts with the cloud. By abstracting the complexities of Kubernetes while retaining the power of AWS, it offers a scalable path for everyone from hobbyists to Fortune 500 companies. The focus on features like **Preview Environments**, **Private Cloud** isolation, and significant cost savings over serverless alternatives makes it a compelling choice for the next generation of web applications. As the platform matures with more regional support and deeper API integration, the barrier between "writing code" and "running code" will continue to vanish.
Feb 6, 2026Overview: The Context Gap in AI Development AI agents have changed how we write code, but they often struggle with the nuances of specific frameworks. Standard models like Claude 3.5 Sonnet or GPT-4o possess vast general knowledge but lack the hyper-specific context of your local Laravel project. This lead to hallucinations, outdated syntax, or the AI suggesting patterns that conflict with your application's architecture. Laravel Boost solves this by acting as a bridge. It injects project-specific metadata, documentation, and "skills" directly into your AI agent's reasoning loop. Instead of manually feeding documentation to a chat window, Boost automates the context delivery. Version 2.0 introduces a major shift from a monolithic guideline approach to a modular, "skills-first" architecture. This reduces context bloat, saves on token costs, and makes the AI significantly more accurate by only providing the information it needs at that exact moment. Prerequisites To follow this guide and implement Boost 2.0, you should be comfortable with the following: * **PHP 8.2+:** Boost 2.0 has officially dropped support for PHP 8.1. * **Laravel 11 or 12:** Older versions like Laravel 10 are supported only by legacy versions of Boost (v1.x). * **Composer:** Basic knowledge of managing PHP dependencies. * **AI Coding Agents:** Familiarity with tools like Cursor, Claude Code, GitHub Copilot, or Juni. Key Libraries & Tools * **Laravel Boost:** The core CLI tool and package that manages AI context and skills. * **Laravel MCP:** A package for building Model Context Protocol servers, allowing AI agents to interact with your app's internal state (routes, database schemas, etc.). * **Remotion:** A React-based framework for programmatic video creation, often used as a demonstration of complex AI skill integration. * **Prism:** A Laravel package for working with LLMs, used to demonstrate how documentation can be bundled directly into vendor folders for AI consumption. Code Walkthrough: Installing and Configuring Boost 2.0 Setting up Boost 2.0 is a methodical process. It begins with the Laravel installer and moves into a randomized, aesthetically pleasing configuration CLI. 1. Installation First, ensure your Laravel installer is up to date to access the built-in Boost prompts during new project creation. If you are adding it to an existing project, use Composer: ```bash composer require laravel/boost --dev ``` 2. Initialization Run the install command to start the interactive configuration. ```bash php artisan boost:install ``` This command triggers a CLI interface featuring randomized gradients—a touch of "developer joy" added by Pushpak Chhajed. You will be prompted to select which features to configure: AI Guidelines, Agent Skills, or the MCP server. 3. Selecting Your AI Agent Boost 2.0 simplifies agent selection. Instead of choosing both an IDE and an agent, you now choose the specific agentic tool you use daily, such as Claude Code or Cursor. Boost will then automatically determine the correct file paths for these tools. 4. Automated Skill Syncing To ensure your AI context stays updated as your project evolves, add the update command to your `composer.json` file: ```json "scripts": { "post-update-cmd": [ "@php artisan boost:update" ] } ``` This ensures that every time you update your dependencies, Boost re-scans your `composer.json` and syncs the relevant skills for packages like Inertia, Tailwind CSS, or Livewire. Deep Dive into Skills vs. Guidelines Understanding the distinction between these two features is critical for a clean development workflow. Guidelines: The Global Rules Guidelines are persistent. They contain high-level rules that the AI should *always* know. For example, if you always use Pest for testing or strictly follow an Action-based architecture, these belong in your guidelines. However, shoving every package's documentation into a guideline leads to "context fatigue," where the AI becomes overwhelmed and starts to hallucinate. Skills: The On-Demand Context Skills are modular Markdown files. They aren't loaded into the AI's memory until they are needed. Each skill has a name and a description in its front matter. When you ask the AI to "build a new UI component with Tailwind," the agent sees the keyword "Tailwind," looks at its available skills, and activates the Tailwind CSS skill. This keeps the prompt lean and the output precise. Syntax Notes: Custom Skill Creation Creating a custom skill allows you to automate highly specific tasks, like generating pull request descriptions or adhering to internal API versioning standards. Skills rely on a specific Markdown front matter format. ```markdown --- name: my-custom-skill description: Use this skill when generating API endpoints or PR descriptions. --- My Custom Skill Rules - Always use the `App\Actions` namespace for business logic. - Ensure all API responses are wrapped in a standard `JsonResource`. - Pull Request descriptions must include a 'Breaking Changes' section. ``` When you save this in a local `.boost/skills` directory and run `php artisan boost:update`, Boost replicates this file into the hidden configuration folders of your chosen AI agents (e.g., `.cursor/rules` or `.claudecode/skills`). Practical Examples Automating Pull Requests You can create a skill that teaches an agent how to use the GitHub CLI. By invoking the skill with a slash command (e.g., `/create-pr`), the AI can analyze your staged changes, write a formatted description, and execute the CLI command to open the PR. Package-Specific Intelligence If you build a project using Filament, you don't want the AI thinking about Filament when you are just debugging a console command. By using a Filament skill, the AI only accesses those specific layout and component rules when you are actively working on the admin panel. Tips & Gotchas * **Git Management:** Never commit the auto-generated agent folders (like `.cursor/rules`) to your repository. These are local mirrors. Only commit the `.boost` folder and your `boost.json` file. This allows your teammates to run `boost:install` and get the exact same AI behavior on their machines. * **Hallucination Prevention:** If your AI starts ignoring your project structure, check your guideline length. If it exceeds 500 lines, move package-specific rules into individual skills. * **Legacy Projects:** Do not attempt to use Boost 2.0 on Laravel 10 projects. The dependency tree for the new MCP features and skills requires the modern internals found in Laravel 11 and up. * **Manual Invocation:** If an agent fails to auto-detect a skill, you can usually force it by using a slash command in the chat interface. Most modern agents support `/` to list and select active skills.
Jan 30, 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, 2026A New Standard for Intelligent Syntax The Laravel ecosystem has always thrived on the philosophy of developer happiness, transforming complex backend tasks into expressive, readable code. With the introduction of the Laravel AI SDK, that same design aesthetic now reaches into the messy world of Large Language Models. For developers who have struggled with fragmented libraries or inconsistent API wrappers, this first-party solution represents a major shift toward standardized, robust AI implementation. The Power of Encapsulated Agent Classes While many demos focus on flashy text generation, the real strength of this SDK lies in its structural organization. The introduction of **Agent classes** provides a dedicated home for AI logic. Instead of scattering prompts and configuration throughout controllers or services, developers can now encapsulate specific behaviors within discrete classes. This organization allows for per-agent customization, ensuring that a translation agent and a data-summarization agent maintain separate toolsets and instructions. Tool Usage and Customization Beyond simple text completion, the SDK focuses heavily on functional utility. The ability to define tool usage directly within an agent class means the AI can interact with your application’s existing logic in a controlled, type-safe manner. This level of thoughtfulness mirrors the core Laravel experience: providing the underlying infrastructure so developers can focus on building unique features rather than fighting the plumbing of various AI providers. Practical Application in the Real World For creators like Ian Landsman, the SDK arrives at a critical juncture for projects like Outro. By waiting for a first-party implementation, developers often find they can write significantly less code while achieving better results. The seamless integration with other ecosystem tools like Livewire ensures that the barrier to entry for building complex, AI-driven applications has never been lower. As the platform simmers and matures, the requirement for manual, boilerplate-heavy AI code continues to evaporate.
Jan 22, 2026Overview: The Shift to Fully Managed Infrastructure Moving a high-traffic production application like Laravel News from a managed server environment like Laravel Forge to a serverless, fully managed platform represents a significant evolution in how we think about hosting. For years, developers have relied on provisioning Linode or DigitalOcean droplets through Forge, which strikes a great balance between control and convenience. However, the manual overhead of scaling for traffic spikes, updating PHP versions, and managing security patches remains a persistent distraction from the core task of building features. Laravel Cloud solves this by abstracting the server away entirely. Instead of managing a "box," you manage an environment. This tutorial walks through the live migration of a real-world asset, demonstrating how to provision resources, sync environment variables, and execute a zero-downtime domain cutover. The goal is simple: eliminate the need for developers to "buy a bigger boat" every time a CPU spike hits, replacing manual intervention with automated, intelligent scaling. Prerequisites & Preparation Before initiating a migration of this scale, you need to ensure your application is container-ready. While Laravel Cloud handles the orchestration, the underlying architecture relies on Docker images. * **Environment Parity**: Ensure your local development environment—ideally using Laravel Herd—mirrors the production PHP version as closely as possible. * **Stateless File Storage**: Any files stored on the local disk of a Forge server must be moved to object storage like Amazon S3 or Cloudflare R2. Since cloud instances are ephemeral, local disk storage will not persist across deployments. * **DNS Access**: You must have access to your DNS provider (e.g., Cloudflare) to modify CNAME records during the final cutover phase. Key Libraries & Tools * **Laravel Cloud**: The primary deployment platform and infrastructure orchestrator. * **Laravel Valkyrie**: The managed cache solution optimized for high-performance Laravel applications. * **TablePlus**: A database management GUI used for importing legacy data into the new cloud cluster. * **Cloudflare**: Used for DNS management and as a proxy to ensure SSL and edge caching. * **Algolia**: The search engine integrated into the app, which requires careful handling during data seeding to avoid duplicate indexing. Code Walkthrough: Provisioning and Deployment 1. Resource Provisioning The first step involves creating the infrastructure pillars: the database and the cache. In the cloud dashboard, adding a resource automatically handles the "plumbing." ```bash Example of how environment variables are injected automatically DB_CONNECTION=mysql DB_HOST=your-cluster-id.cloud-region.aws.com DB_DATABASE=main CACHE_DRIVER=valkyrie ``` When you add Laravel Valkyrie or a MySQL cluster, the platform injects these secrets directly into the container runtime. You do not need to copy-paste hostnames manually, which reduces the surface area for configuration errors. 2. Customizing Build and Deploy Commands Every application has unique build requirements. For Laravel News, we needed to ensure Filament component caches were cleared during the build phase. Unlike Forge, where you might run these on the live server, Laravel Cloud distinguishes between **Build Commands** (which run while creating the image) and **Deploy Commands** (which run just before the new version goes live). ```bash Build Commands php artisan filament:cache-components Deploy Commands php artisan migrate --force ``` 3. Handling the Database Import Since we are moving to a new cluster, we must bridge the data. By enabling a **Public Endpoint** temporarily on the cloud database, we can connect via TablePlus and import the legacy SQL dump. *Note: Always disable the public endpoint once the import is complete to maintain a secure, private network perimeter.* Syntax Notes: The Environment Canvas The UI introduces the concept of the **Environment Canvas**. This visual representation shows the relationship between your **App Cluster** (the compute), your **Edge Network** (the domains), and your **Resources** (data stores). Notable features include: * **Flex vs. Pro Compute**: You can toggle between different CPU and RAM allocations. For a site like Laravel News, starting with a "Pro" size (2 vCPUs, 4GB RAM) provides a safety buffer during the initial migration traffic. * **Auto-scaling Replicas**: You define a minimum and maximum number of replicas (e.g., 1 to 3). The platform monitors HTTP traffic and spins up new instances automatically when load increases, then spins them down to save costs when traffic subsides. Practical Examples: Real-World Use Cases Beyond simple hosting, the migration enables advanced workflows like **Preview Environments**. Imagine a partner wants to see a new advertisement placement before it goes live. In the old Forge world, you might have to manually set up a staging site. With Laravel Cloud, every Pull Request can trigger a temporary, isolated environment with its own URL. ```bash Logic flow for Preview Environments 1. Developer creates a branch 'new-ad-feature' 2. GitHub Action triggers Laravel Cloud 3. Cloud provisions a temporary compute instance and database 4. URL generated: https://new-ad-feature.laralnews.preview.cloud 5. Partner reviews; Developer merges PR; Cloud destroys the temporary environment ``` Tips & Gotchas * **The Log Trap**: If you see a 500 error immediately after deployment, check your log driver. Laravel Cloud manages logging automatically; manually setting `LOG_CHANNEL=stack` or similar in your custom environment variables can sometimes conflict with the platform's internal log aggregation. * **Queue Connections**: By default, the platform might assume a `database` queue driver. If you haven't run your migrations or created the `jobs` table yet, your application might crash during the seeding process if it attempts to dispatch a background job. Set `QUEUE_CONNECTION=sync` temporarily during the initial setup to ensure seeds finish without error. * **Statelessness**: Remember that the `/storage` directory is not persistent. If your application allows users to upload avatars (as Eric Barnes discovered during the live stream), those images will vanish on the next deploy unless they are stored in a persistent bucket like Amazon S3 or Cloudflare R2.
Jan 22, 2026Overview: The Quest for End-to-End Type Safety For years, developers building with Laravel have faced a persistent friction point: the communication gap between the PHP backend and the JavaScript or TypeScript frontend. While PHP has evolved into a robust, type-heavy language, those types often vanish the moment data hits the network. You might define a precise `Product` model or a strict `Enum` in Laravel, but your frontend remains blissfully unaware, forced to rely on manual type definitions that inevitably drift out of sync with the server. Laravel Wayfinder solves this by acting as an automated bridge. It doesn't just generate static files; it performs deep analysis of your application to extract routes, Inertia.js props, validation rules, and broadcast events, turning them into fully-typed TypeScript helpers. This ensures that a change in your Laravel controller immediately triggers a type error in your Vue.js or React components if the data contract is broken. It brings the "all-in-one" type safety of Livewire to the world of modern SPAs and separated repositories. Prerequisites To get the most out of this tutorial, you should be comfortable with: * **Laravel 10+**: Basic knowledge of routing, controllers, and Form Requests. * **Modern Frontend Frameworks**: Familiarity with React or Vue.js, specifically using Vite as a build tool. * **TypeScript Basics**: Understanding how interfaces and types provide editor autocomplete and build-time safety. * **GitHub Actions**: Basic knowledge of CI/CD workflows if you plan to sync types across separate repositories. Key Libraries & Tools * **Surveyor**: A "mostly static" analysis tool that inspects your PHP classes, methods, and bindings to extract raw metadata about your app. * **Ranger**: A layer above Surveyor that consumes raw data and transforms it into rich, digestible Data Transfer Objects (DTOs). * **Wayfinder Vite Plugin**: The client-side companion that watches for backend changes and triggers the regeneration of TypeScript definitions in real-time. * **Laravel Echo**: When combined with Wayfinder, it provides type-safe event broadcasting payloads. Code Walkthrough: Implementing Type-Safe Contracts 1. The Vite Integration Everything starts with the Vite configuration. You must register the Wayfinder plugin to enable the watcher that tracks your PHP files. ```javascript import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import wayfinder from 'wayfinder-vite-plugin'; export default defineConfig({ plugins: [ laravel(['resources/js/app.ts']), wayfinder({ // Patterns of files to watch for changes watch: ['app/Http/Controllers/**', 'app/Models/**'] }), ], }); ``` 2. Auto-Generating Shared Props In an Inertia.js application, shared props (like the current user or flash messages) are notoriously difficult to type. Wayfinder analyzes your `HandleInertiaRequests` middleware to sync these automatically. ```php // app/Http/Middleware/HandleInertiaRequests.php public function share(Request $request): array { return array_merge(parent::share($request), [ 'auth' => [ 'user' => $request->user(), ], 'is_admin' => (bool) $request->user()?->admin, ]); } ``` On the frontend, Wayfinder performs **declaration merging** so that the `usePage` hook knows exactly what is available: ```typescript import { usePage } from '@inertiajs/react'; const { props } = usePage(); // TypeScript knows 'is_admin' exists and is a boolean if (props.is_admin) { console.log("Access granted"); } ``` 3. Validation via Form Requests One of the most powerful features in the latest beta is the extraction of validation rules. When you type-hint a `FormRequest` in your controller, Wayfinder generates a matching TypeScript interface. ```php // app/Http/Requests/ProductUpdateRequest.php public function rules(): array { return [ 'name' => 'required|string', 'price' => 'required|numeric|min:0', 'description' => 'nullable|string', ]; } ``` Wayfinder converts these rules into a type you can pass to Inertia's `useForm` hook, preventing you from sending the wrong data types to the server. ```typescript import { useForm } from '@inertiajs/react'; import { ProductUpdateRequest } from '@/types/generated'; const form = useForm<ProductUpdateRequest>({ name: '', price: 0, description: null, }); ``` Syntax Notes: Specificity Matters Wayfinder relies on the clarity of your PHP code. The more specific your types are in Laravel, the better the TypeScript output. For example, if a controller method returns a collection, use PHP DocBlocks or native type hints to specify the model within that collection. Wayfinder effectively "reads" your intent. If you mark a property as `nullable` in a Form Request, it will correctly append `| null` to the generated TypeScript definition. Practical Example: Jumping the Fence What happens if your Laravel backend and Vue.js frontend live in separate repositories? This is the "Jump the Fence" scenario. You can use a GitHub Actions workflow to keep them in sync. When you commit a change to the Laravel API, the workflow runs Wayfinder, generates the new types, and automatically opens a Pull Request against the frontend repository. This workflow ensures that the frontend team is immediately notified when a route changes or a new field is added to an API response. It turns a manual communication task into a fail-safe automated process. Tips & Gotchas * **Cashing Issues**: During beta, the internal cache of Surveyor can occasionally become corrupted. If your types aren't reflecting your PHP changes, try clearing your app cache or restarting the Vite dev server. * **Performance in Large Apps**: Because Wayfinder performs static analysis across your entire codebase, very large applications might experience a slight delay (a few seconds) between saving a PHP file and the TypeScript server picking up the change. * **Tree Shaking**: Unlike older tools that exported every route into a global object, Wayfinder exports individual route helpers. This allows modern bundlers to "tree-shake" away any routes that aren't actually imported in your frontend code, keeping your production bundles lean. * **Eloquent Resources**: Full support for complex `JsonResource` transformations is still in active development. For the most reliable results, stick to `arrayable` and `jsonable` objects for now.
Jan 10, 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, 2026The launch of Laravel Wrapped 2025 marks a significant cultural shift for the Laravel ecosystem. By translating raw deployment data into a personalized, shareable narrative, the team created a moment of reflection for thousands of developers who spend their year in the terminal. This project was not merely about exposing database rows; it required a sophisticated blend of React, InertiaJS, and Laravel to handle the complex intersection of high-volume data and interactive UI design. The Technical Foundation: Bridging the Stack Building a high-traffic marketing site that handles personalized data requires a stack that favors both developer velocity and run-time performance. The team opted for a combination of React and InertiaJS on the front end, allowing for the rich, stateful interactions needed for the customization features without sacrificing the robust routing and back-end logic provided by Laravel. Using Tailwind CSS ensured that the design system remained consistent across the sprawling set of personalized cards and the main landing page. One of the primary challenges involved the data scraping process. This was not a real-time API integration. Instead, the team performed a massive data extraction from Laravel Cloud, Laravel Forge, and Laravel Nightwatch. By centralizing this data into a dedicated Wrapped database, they could perform heavy aggregations—such as calculating percentile rankings and deployment streaks—without impacting the performance of the production tools themselves. This architectural decision allowed for complex queries, like determining a user's "midnight deploy" count by converting UTC timestamps to the user's local browser time on the fly. Dynamic Social Sharing with OGKit and Blade In the era of social media, a "Wrapped" experience lives or dies by its shareability. The team pushed beyond static images by implementing a highly customizable Open Graph (OG) image generator. They utilized OGKit, a tool that allows developers to render OG images using standard Blade templates. This bridge between traditional web rendering and image generation meant that every time a user tweaked a sticker or changed a theme in the React-based share modal, the back end could instantly update a configuration record in the database. To ensure these images appeared instantly when shared on platforms like Twitter or LinkedIn, the system performed a "warm-up" request to OGKit the moment a user clicked the finish button. This mitigated the latency issues often seen with on-demand image generation. Furthermore, the team implemented a clever middleware hack: when a user shares their personalized link, social media bots are served the custom OG image, but actual human clicks are redirected to the global Laravel Wrapped landing page. This protects sensitive deployment domains while still allowing developers to show off their high-level stats. User Interface: Quirk, Stickers, and D&D Kit Designing for developers requires a balance of utility and playfulness. The "sticker" aesthetic, led by designers Tilly and Jeremy, was central to this. These weren't just decorative elements; they were interactive components powered by D&D Kit for React. Implementing drag-and-drop functionality within a modal while accounting for offsets, scaling, and rotation was one of the most significant front-end hurdles. The team had to ensure that the sticker placement in the React UI perfectly mirrored the final render in the Blade-based OG image. This interactivity extends to the data selection process. The modal only presents stats for which the user actually has data. If a developer never used Nightwatch, those cards are filtered out, ensuring a clean, relevant experience for every user. This programmatic filtering prevents the "empty state" problem that often plagues data-heavy applications. The result is a UI that feels custom-built for each individual, rather than a generic template populated with zeros. AI Integration and the MCP Chat Box To add a layer of personality that static stats cannot provide, the team integrated the OpenAI PHP package to generate snarky, encouraging, and "zany" messages for each user. These messages were informed by specific data points—such as a high number of deployments after midnight or a frequent use of the "WIP" commit message. By feeding these stats into a tailored prompt, the AI could create a unique narrative that felt like an inside joke within the community. Taking this a step further, the site features a chat box powered by the Model Context Protocol (MCP). This allows users to interrogate their own data through a natural language interface. Instead of just looking at a card that says "81 new apps," a user can ask, "What was my fastest deployment time?" or "How many times did I cancel a deploy?" The MCP tooling connects the LLM directly to the user's anonymized data via their unique UUID, providing a futuristic way to interact with personal development history. Implications for the Developer Community The success of Laravel Wrapped 2025 demonstrates the power of "building in public" and community engagement. By giving developers a tool to celebrate their productivity, Laravel strengthens the emotional connection to its brand. It transforms a utility (a deployment platform) into a community milestone. Technically, it serves as a masterclass in combining modern JavaScript frameworks with the reliability of the Laravel back end to create a high-polish, high-impact product in a short timeframe. As the team looks toward 2026, the inclusion of more motion-based animations and deeper data insights promises to make this an annual staple of the tech calendar.
Dec 6, 2025Overview: Beyond the Skeleton Building a front-end interface that resonates with users requires moving past basic utility. Most developers can stand up a functional site, but creating an emotional connection requires a systematic approach to aesthetics and interaction. This tutorial breaks down a five-step formula used to transform stripped-back layouts into high-end production sites, specifically referencing the design patterns found on the Laracon and Nightwatch marketing pages. By treating design as a series of additive layers, you can eliminate the intimidation factor of complex Figma files and ship polished code with confidence. Prerequisites To follow this guide, you should have a solid grasp of HTML structure and basic CSS. Experience with utility-first styling is beneficial, as the examples utilize Tailwind CSS. Familiarity with JavaScript or a component-based framework like React or Laravel is helpful for managing the dynamic elements. Key Libraries & Tools * Tailwind CSS: The primary utility framework for styling and layout. * Tailwind CSS Motion: A library by Rombo used for declarative on-page load animations. * SVG Filters: Specifically used for generating noise and texture overlays. Step-by-Step Design Implementation 1. Spacing and Padding Start by giving your content breathing room. Use consistent padding and margins to define the hierarchy. In Tailwind, this often involves setting a horizontal and vertical base. ```html <div class="px-20 pt-20 mt-10 flex flex-col gap-6"> <!-- Content goes here --> </div> ``` 2. Typography and Font Styling Moving beyond the default sans stack defines the brand's voice. Apply specific weights and families. Preloading fonts ensures a smooth initial render without layout shifts. ```html <h2 class="font-semibold font-sans text-4xl">The Venue</h2> <p class="font-mono text-sm text-gray-400">August 2025</p> ``` 3. Layering for Depth Flat designs feel static. Introduce depth by stacking elements. This can include background shapes, absolutely positioned decorative rectangles, or bitmap layers that sit behind your primary imagery. ```html <div class="relative"> <img src="venue.jpg" class="relative z-10" /> <div class="absolute -top-4 -right-4 w-20 h-20 bg-red-500 z-0"></div> </div> ``` 4. The "Something Weird" Element A memorable site needs a signature detail. For the Nightwatch site, this is a grain or noise filter implemented via SVG. This texture makes the interface feel tactile rather than digital. ```html <svg class="pointer-events-none fixed inset-0 z-50 opacity-20"> <filter id="noise"> <feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" /> <feColorMatrix type="saturate" values="0" /> </filter> <rect width="100%" height="100%" filter="url(#noise)" /> </svg> ``` 5. Animation and Interaction Finalize the experience with motion. Use hover states that react to user input and entrance animations that guide the eye on page load. Use the Tailwind CSS Motion library to stagger text arrivals. ```html <span class="motion-safe:animate-fade-in motion-delay-500"> Interactive Content </span> ``` Syntax Notes and Best Practices When using Tailwind CSS, leverage the `motion-safe` variant to respect user accessibility preferences. For layered elements, remember that `relative` and `absolute` positioning require a careful hand with `z-index` to maintain the correct visual stack. Always utilize `font-mono` for data-heavy text like dates or coordinates to create a technical, structured feel. Practical Examples These techniques shine in marketing landing pages where the goal is high conversion and brand recall. For instance, the Laracon site uses the "serrated edge" ticket button to reinforce the conference theme. Similarly, Nightwatch employs dark mode paired with a radial gradient and noise filter to establish a moody, secure atmosphere appropriate for a security product. Tips & Gotchas Avoid over-animating. If every element on the page is moving simultaneously, you lose the user's focus. Use staggered delays (e.g., `motion-delay-200`, `motion-delay-500`) to create a logical flow. If your noise filter causes performance lag on low-end devices, consider lowering the `numOctaves` in the SVG turbulence setting or reducing the opacity of the overlay.
Aug 16, 2025