Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

Introducing Spatie Guidelines for Laravel Boost

Original – by Freek Van der Herten – 2 minute read

If you're using AI tools like Claude Code to help write code, you've probably noticed they don't automatically know your team's coding conventions. The AI might write perfectly valid PHP, but it won't follow your specific style guide unless you tell it to.

That's the problem Laravel Boost solves. It lets you provide guidelines that AI assistants will reference when generating code. Tonight I released a package that brings our Spatie coding standards to Boost: spatie/boost-spatie-guidelines.

Installation

Install the package via Composer:

composer require spatie/boost-spatie-guidelines --dev

Then run the Boost installer:

php artisan boost:install

Select the Spatie guidelines from the list:

boost-install

They'll be installed to .ai/guidelines/boost-spatie-guidelines/.

What's in the package?

The package contains AI-optimized versions of our coding standards. Things like:

  • PSR compliance (PSR-1, PSR-2, PSR-12)
  • Type declarations and nullable syntax
  • Class structure and constructor property promotion
  • Control flow patterns (early returns, happy path first)
  • Laravel conventions for routes, controllers, and configuration
  • Our naming conventions (when to use camelCase, kebab-case, snake_case)
  • Blade templates and validation rules
  • Testing best practices

These are the same guidelines we've been using at Spatie for years, just formatted so AI tools can understand and apply them.

Why this matters

AI coding assistants are incredibly useful, but they need context to be truly helpful. Without guidelines, they'll write generic code that might not match how your team works.

With this package installed, when you ask Claude or another AI to write code in your Laravel project, it'll automatically follow Spatie's conventions. No more reviewing AI-generated code just to fix style issues.

Keeping things up to date

When we update our guidelines, just update the package and refresh:

composer update spatie/boost-spatie-guidelines
php artisan boost:update

If you want to see the full, human-readable version of our guidelines, check out spatie.be/guidelines.

The package is available on GitHub: spatie/boost-spatie-guidelines.

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.