The New Frontier of Laravel AI Agent Skills Laravel Skills recently surfaced as a specialized directory at skills.laravel.cloud, showcasing 143 reusable agent skills for PHP developers. This platform, powered by the Vercel ecosystem Skills.sh, promises to expand what AI agents can do within a codebase. While the interface is polished, the underlying mechanics reveal a complex marketplace of automated prompts and third-party scripts. The barrier to entry for adding these skills via Laravel Boost is incredibly low, but as with any ecosystem that scales quickly, quality and provenance become the primary concerns. Under the Hood: The GitHub Source Reality Investigating the source code for these skills leads down a rabbit hole of diverse GitHub repositories. Many popular skills, such as the Laravel Security Audit, originate from repositories like Anti-Gravity Awesome Skills. A recurring pattern emerges: these repositories often contain hundreds of skills across various programming languages, frequently maintained by anonymous authors like sick n33. This raises a critical question about domain expertise. Are these rules crafted by seasoned Laravel architects, or are they AI-generated prompts built by other AI agents? The commit history for several skills shows bulk updates generated by Claude models, suggesting a cycle where AI is essentially training itself on how to audit code. Analysis: Pros and Cons of Third-Party Skills The immediate benefit of these skills is their utility in scanning legacy codebases. A quick run of a security audit can flag user-writable system prompts or improper file permissions in minutes. However, the drawbacks are significant. Many "best practice" skills enforce highly opinionated patterns—such as mandatory strict types or specific repository patterns—that may not align with a team's internal standards. Because these skills are often static snapshots from a larger database, they risk becoming outdated the moment a new version of Laravel or PHP launches. There is no central governing body ensuring these 143 skills remain current with Laravel 13 or beyond. Strategic Alternatives and Deterministic Tools For developers seeking reliability, the official guidelines within Laravel Boost remain the gold standard. These are maintained by the core Laravel team and receive constant updates. For specific frameworks like Filament, where AI models often hallucinate deprecated code, deterministic tools like FilaCheck offer a safer path. Unlike AI-driven skills that may ignore instructions, FilaCheck functions like Laravel Pint, performing local scans for known deprecations without the unpredictability of a prompt-based agent. Final Verdict Laravel Skills is a fascinating experiment in scaling AI utility, but it operates as a "Wild West." Use these skills for secondary code reviews and quick security sanity checks, but never treat them as an absolute source of truth. Trust the official Laravel core team for architectural guidelines and lean on deterministic linting tools for critical syntax validation.
Laravel Pint
Products
- Mar 17, 2026
- Feb 23, 2026
- Dec 15, 2025
- Dec 6, 2025
- Aug 27, 2025
The Vision of Managed Infrastructure Laravel Cloud represents a monumental shift in how developers interact with the infrastructure that powers their applications. The goal isn't just to provide a hosting space but to eliminate the friction that exists between writing code and making it live. For years, Laravel developers chose between the flexibility of Laravel Forge and the serverless simplicity of Laravel Vapor. This new platform bridges that gap by offering a fully managed, autoscaling environment that handles everything from compute to MySQL and PostgreSQL databases without requiring the user to manage an underlying AWS or DigitalOcean account. Speed served as the primary North Star for the development team. During early planning sessions in Amsterdam, the team set an ambitious goal: a deployment time of one minute or less. They surpassed this target through aggressive optimization, achieving real-world deployment times of approximately 25 seconds. This speed is not merely a vanity metric; it fundamentally changes the developer's feedback loop. When a push to a GitHub repository results in a live environment in less time than it takes to make a cup of coffee, the barrier to iteration vanishes. This efficiency is achieved through a bifurcated build and deployment process that leverages Docker and Kubernetes to ensure that code transitions from a repository to a live, edge-cached environment with zero downtime. The Engine Room: Scaling with Kubernetes Underpinning the entire platform is Kubernetes, which the engineering team describes as the "engine room" of the operation. The decision to use Kubernetes wasn't taken lightly, as it introduces significant complexity. However, it provides the isolation, self-healing capabilities, and scalability necessary for a modern cloud platform. The architecture separates concerns into specialized clusters: a build cluster and a compute cluster. When a user initiates a deployment, the build cluster pulls the source code and bakes it into a Docker image based on the user's specific configuration (such as PHP version or Node.js requirements). This image is then stored in a private registry. The compute cluster’s operator—a custom piece of software watching for deployment jobs—then pulls this image and creates new "pods." These pods spin up while the old version of the application is still serving traffic. Only when the new pods pass health checks does Kubernetes route traffic to them, ensuring that users never see a 500 error during a transition. This ephemeral nature of pods means storage is not persistent locally; developers must use object storage like Amazon S3 to ensure files survive between deployments. Strategic Choices: React, Inertia, and the API Choosing a technology stack for a platform as complex as Laravel Cloud required balancing immediate development speed with long-term flexibility. The team ultimately landed on a stack featuring React and Inertia.js. While Livewire is a staple in the Laravel ecosystem, the team felt the React ecosystem offered a more mature set of pre-built UI components—specifically citing Shadcn UI—that allowed them to prototype and build the complex "canvas" dashboard without a dedicated designer in the earliest stages. This decision also looks toward the future. The team knows a public API is a high-priority requirement for the community. By using Inertia.js, the front end and back end stay closely coupled for rapid development, but the business logic is carefully abstracted. This abstraction is achieved through the heavy use of the **Action Pattern**. Every major operation, from adding a custom domain to provisioning a database, is encapsulated in a standalone Action class. This means that when the time comes to launch the public API, the team won't need to rewrite their logic; they will simply call the existing Actions from new API controllers. This methodical approach prevents the codebase from becoming a tangled web of controller-resident logic, ensuring the platform remains maintainable as it scales to thousands of users. Development Patterns for Robust Systems Developing a cloud platform requires handling hundreds of external API calls to service providers. To keep local development fast and reliable, the team utilizes a strict **Fakes** pattern. Instead of calling real infrastructure providers during local work, the application binds interfaces to the Laravel service container. If the environment is set to "fake," the container injects a mock implementation that simulates the behavior of the real service—even simulating the latency and logs of a real deployment. Furthermore, the team has embraced testing coverage as a critical safety net. While some developers view high coverage percentages as an empty goal, for the Laravel Cloud team, it serves as an early warning system. Because the platform manages sensitive infrastructure, missing an edge case in a deployment script can have catastrophic results. The CI/CD pipeline enforces strict coverage limits; if a new pull request causes the coverage to drop, it is a signal that an edge case or a logic branch has been ignored. This rigorous standard, combined with Pest for testing and Laravel Pint for code style, ensures the codebase remains clean and predictable even as the team grows. Database Innovation and Hibernation A standout feature of the platform is its approach to cost management through hibernation. Recognizing that many applications—especially staging sites and hobby projects—don't receive 24/7 traffic, the team implemented a system where both compute and databases can "go to sleep." If an environment receives no HTTP requests for a set period, the Kubernetes pods are spun down, and the user stops paying for compute resources. The moment a new request arrives, the system wakes up, usually within 5 to 10 seconds. This logic extends to the database layer. The serverless PostgreSQL offering supports similar hibernation. For users who prefer MySQL, the platform recently added support in a developer preview mode. The platform handles the complexities of database connectivity by automatically injecting environment variables into the application runtime. When a database is attached via the dashboard, the system detects it and automatically enables database migrations in the deployment script. This level of automation removes the manual "plumbing" that usually accompanies setting up a new environment, allowing developers to focus entirely on the application logic. Implications for the Laravel Ecosystem The launch of Laravel Cloud fundamentally alters the economics of the Laravel ecosystem. By moving to a model where developers pay only for what they use through compute units and autoscale capacity, the barrier to entry for high-scale applications is lowered. Teams no longer need a dedicated DevOps engineer to manage complex Kubernetes configurations or manually scale server clusters during traffic spikes. The platform manages the "undifferentiated heavy lifting" of infrastructure. Looking forward, the roadmap includes first-party support for Laravel Reverb for real-time applications and the much-requested "preview deployments." These preview environments will allow teams to spin up a fully functional, isolated version of their app for every GitHub pull request, facilitating better QA and stakeholder reviews. As the platform matures and introduces more fine-grained permissions and a public API, it is poised to become the default choice for developers who value shipping speed and operational simplicity over the manual control of traditional server management.
Feb 25, 2025Overview: The Power of Custom Laravel Packages Building a Laravel package allows you to encapsulate reusable logic, share it across multiple projects, or contribute to the vibrant open-source ecosystem. This tutorial demonstrates how to build a sophisticated caching package named method-cache. Unlike a basic "Hello World," this project implements a `#[Cachable]` PHP attribute that automatically handles method results through the Laravel Cache system. This technique reduces boilerplate code and improves readability by replacing messy `Cache::remember` blocks with clean, declarative metadata. Prerequisites To follow this guide, you should have a firm grasp of PHP 8.3 or higher, as we utilize modern features like attributes and constructor property promotion. Familiarity with the Laravel service container is essential, as package development relies heavily on binding and resolving dependencies. You should also be comfortable with Composer for dependency management and have a local development environment prepared. Key Libraries & Tools * **Composer**: The backbone of PHP dependency management. Every Laravel package is, at its core, a Composer package. * **Orchestra Testbench**: An indispensable tool that simulates a full Laravel environment for testing packages without needing a standalone app. * **Pest PHP**: A focus-driven testing framework used here for its expressive syntax. * **Laravel Pint**: An opinionated PHP code style fixer that ensures your package follows Laravel standards. * **Spatie Package Skeleton**: A popular boilerplate for jump-starting package development (though we build a minimal version here). Code Walkthrough: Building the Foundation 1. Initializing the Package Begin by creating a directory and initializing the `composer.json` file. This defines your namespace and dependencies. ```json { "name": "yourname/method-cache", "autoload": { "psr-4": { "YourName\\MethodCache\\": "src/" } }, "require-dev": { "orchestra/testbench": "^9.0", "pestphp/pest": "^2.0" } } ``` 2. Creating the Service Provider The Service Provider is the entry point of your package. It registers bindings in the Laravel container and handles auto-discovery. We use the `beforeResolving` hook to intercept classes and inject our caching logic. ```php namespace YourName\MethodCache; use Illuminate\Support\ServiceProvider; class MethodCacheServiceProvider extends ServiceProvider { public function boot() { $this->app->beforeResolving(function ($abstract, $app) { if (!class_exists($abstract)) return; if (in_array(HasCachableMethods::class, class_implements($abstract))) { // Logic to override the class with a cached proxy } }); if ($this->app->runningInConsole()) { $this->commands([MethodCacheCommand::class]); } } } ``` 3. Implementing the Cachable Attribute Attributes provide metadata for our methods. We define a target of `Attribute::TARGET_METHOD` to ensure it's used correctly. ```php #[Attribute(Attribute::TARGET_METHOD)] class Cachable { public function __construct( public int $ttl = 3600, public ?string $key = null ) {} } ``` 4. Crafting the Facade A Facade provides a static interface to our underlying service. First, create the service class, then the Facade that references it. ```php // The Facade namespace YourName\MethodCache\Facades; use Illuminate\Support\Facades\Facade; class MethodCache extends Facade { protected static function getFacadeAccessor() { return 'method-cache-service'; } } ``` Syntax Notes: Reflection and Proxies This package uses **PHP Reflection** to inspect classes at runtime. By looking for the `#[Cachable]` attribute on methods, the package can dynamically decide which logic to wrap in a cache layer. A key technique used here is **Method Overriding**, where we generate a temporary class that extends the user's service and wraps the original method calls in `Cache::remember()`. This avoids the "noise" of manual caching inside the business logic. Practical Examples Imagine a `PodcastService` that performs heavy data analysis. Instead of polluting the method with caching logic, you simply tag it: ```php class PodcastService implements HasCachableMethods { #[Cachable(ttl: 60, key: 'podcast_stats')] public function getStatistics(int $id) { // Heavy database or API work here return Podcast::analyze($id); } } ``` When this service is resolved from the Laravel container, the package automatically ensures that subsequent calls within 60 seconds return the cached result instantly. Tips & Gotchas * **Interface Requirement**: To optimize performance, we only inspect classes that implement a specific interface (e.g., `HasCachableMethods`). This prevents the package from running reflection on every single class resolved by the container, which would cause significant overhead. * **Auto-Discovery**: Don't forget to add the `extra` section to your package's `composer.json`. This allows Laravel to automatically register your service provider and facades upon installation. * **Local Testing**: Use a `path` repository in your main app's `composer.json` to symlink your package locally. This allows you to see changes in real-time without pushing to GitHub or Packagist. * **Recursion Warning**: Be careful when using `beforeResolving`. If your logic inside that hook triggers another resolution of the same class, you'll end up in an infinite loop. Always add checks to ensure you're only processing the target classes once.
Nov 25, 2024Smarter String Manipulation with Case-Insensitivity Handling string transformations in PHP often requires jumping through hoops with regex or manual lowercasing. Laravel has simplified this by enhancing the `Stringable` class. Traditionally, the `replace` method operated strictly with case sensitivity. If you tried to swap "GS" with another value but your source string contained "gs", the operation would fail silently. The latest update introduces a third parameter to the `replace` method. By toggling this boolean, developers can now execute case-insensitive replacements globally across their string objects, reducing the boilerplate code previously needed to normalize data before processing. Adopting the PER Coding Style with Pint Code consistency isn't just about aesthetics; it is about maintainability. Laravel Pint has established itself as the go-to zero-config linting tool for the ecosystem. While many teams stick to the default Laravel preset, the industry is moving toward the PER Coding Style, which serves as the spiritual successor to PSR-12. Pint now supports this modern standard out of the box. Switching your entire project to these updated rules is as simple as running a single command: `pint --preset per`. This ensures your codebase stays aligned with the evolving standards of the broader PHP community. Vapor Queue Management: Full Visibility Serverless environments can sometimes feel like a black box, especially when background jobs go sideways. Laravel Vapor has bridged this gap by introducing a dedicated Queue Management dashboard. Instead of hunting through logs, developers now have a real-time snapshot of job performance. You can monitor processed, pending, and failed jobs through a clean interface. This visibility allows for immediate intervention when bottlenecks occur, providing the same level of control you would expect from a traditional server environment but with the scalability of AWS Lambda. Debugging Failures with Precision The most powerful aspect of the new Vapor dashboard is the deep-dive capability for failed jobs. When a background task hits an exception, you can inspect the exact payload and the full stack trace directly from the browser. This eliminates the guesswork involved in reproducing bugs in serverless queues. Once you identify the fix, the dashboard provides intuitive controls to retry the job or delete it. This workflow streamlines the dev-ops side of Laravel development, keeping your application's background processing healthy and transparent.
Apr 4, 2023