You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -10,7 +10,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
10
10
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
11
11
12
12
- php - 8.5
13
-
- laravel/framework (LARAVEL) - v12
13
+
- laravel/framework (LARAVEL) - v13
14
14
- laravel/prompts (PROMPTS) - v0
15
15
- livewire/flux (FLUXUI_FREE) - v2
16
16
- livewire/livewire (LIVEWIRE) - v4
@@ -19,13 +19,14 @@ This application is a Laravel application and its main Laravel ecosystems packag
19
19
- laravel/pail (PAIL) - v1
20
20
- laravel/pint (PINT) - v1
21
21
- laravel/sail (SAIL) - v1
22
-
- phpunit/phpunit (PHPUNIT) - v11
22
+
- phpunit/phpunit (PHPUNIT) - v12
23
23
- tailwindcss (TAILWINDCSS) - v4
24
24
25
25
## Skills Activation
26
26
27
27
This project has domain-specific skills available. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck.
28
28
29
+
-`laravel-best-practices` — Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.
29
30
-`fluxui-development` — Use this skill for Flux UI development in Livewire applications only. Trigger when working with <flux:*> components, building or customizing Livewire component UIs, creating forms, modals, tables, or other interactive elements. Covers: flux: components (buttons, inputs, modals, forms, tables, date-pickers, kanban, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for non-Livewire frameworks or non-component styling.
30
31
-`livewire-development` — Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC/MFC/class-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire.
31
32
-`tailwindcss-development` — Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS.
@@ -61,82 +62,51 @@ This project has domain-specific skills available. You MUST activate the relevan
61
62
62
63
# Laravel Boost
63
64
64
-
- Laravel Boost is an MCP server that comes with powerful tools designed specifically for this application. Use them.
65
+
## Tools
65
66
66
-
## Artisan Commands
67
+
- Laravel Boost is an MCP server with tools designed specifically for this application. Prefer Boost tools over manual alternatives like shell commands or file reads.
68
+
- Use `database-query` to run read-only queries against the database instead of writing raw SQL in tinker.
69
+
- Use `database-schema` to inspect table structure before writing migrations or models.
70
+
- Use `get-absolute-url` to resolve the correct scheme, domain, and port for project URLs. Always use this before sharing a URL with the user.
71
+
- Use `browser-logs` to read browser logs, errors, and exceptions. Only recent logs are useful, ignore old entries.
67
72
68
-
- Run Artisan commands directly via the command line (e.g., `php artisan route:list`, `php artisan tinker --execute "..."`).
69
-
- Use `php artisan list` to discover available commands and `php artisan [command] --help` to check parameters.
73
+
## Searching Documentation (IMPORTANT)
70
74
71
-
## URLs
75
+
- Always use `search-docs` before making code changes. Do not skip this step. It returns version-specific docs based on installed packages automatically.
76
+
- Pass a `packages` array to scope results when you know which packages are relevant.
77
+
- Use multiple broad, topic-based queries: `['rate limiting', 'routing rate limiting', 'routing']`. Expect the most relevant results first.
78
+
- Do not add package names to queries because package info is already shared. Use `test resource table`, not `filament 4 test resource table`.
72
79
73
-
- Whenever you share a project URL with the user, you should use the `get-absolute-url` tool to ensure you're using the correct scheme, domain/IP, and port.
80
+
### Search Syntax
74
81
75
-
## Debugging
82
+
1. Use words for auto-stemmed AND logic: `rate limit` matches both "rate" AND "limit".
83
+
2. Use `"quoted phrases"` for exact position matching: `"infinite scroll"` requires adjacent words in order.
84
+
3. Combine words and phrases for mixed queries: `middleware "rate limit"`.
85
+
4. Use multiple queries for OR logic: `queries=["authentication", "middleware"]`.
76
86
77
-
- Use the `database-query` tool when you only need to read from the database.
78
-
- Use the `database-schema` tool to inspect table structure before writing migrations or models.
79
-
- To execute PHP code for debugging, run `php artisan tinker --execute "your code here"` directly.
80
-
- To read configuration values, read the config files directly or run `php artisan config:show [key]`.
81
-
- To inspect routes, run `php artisan route:list` directly.
82
-
- To check environment variables, read the `.env` file directly.
83
-
84
-
## Reading Browser Logs With the `browser-logs` Tool
85
-
86
-
- You can read browser logs, errors, and exceptions using the `browser-logs` tool from Boost.
87
-
- Only recent browser logs will be useful - ignore old logs.
87
+
## Artisan
88
88
89
-
## Searching Documentation (Critically Important)
90
-
91
-
- Boost comes with a powerful `search-docs` tool you should use before trying other approaches when working with Laravel or Laravel ecosystem packages. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation for the user's circumstance. You should pass an array of packages to filter on if you know you need docs for particular packages.
92
-
- Search the documentation before making code changes to ensure we are taking the correct approach.
93
-
- Use multiple, broad, simple, topic-based queries at once. For example: `['rate limiting', 'routing rate limiting', 'routing']`. The most relevant results will be returned first.
94
-
- Do not add package names to queries; package information is already shared. For example, use `test resource table`, not `filament 4 test resource table`.
89
+
- Run Artisan commands directly via the command line (e.g., `php artisan route:list`). Use `php artisan list` to discover available commands and `php artisan [command] --help` to check parameters.
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms.
96
+
- Execute PHP in app context for debugging and testing code. Do not create models without user approval, prefer tests with factories instead. Prefer existing Artisan commands over custom tinker code.
97
+
- Always use single quotes to prevent shell expansion: `php artisan tinker --execute 'Your::code();'`
- Always use curly braces for control structures, even for single-line bodies.
109
-
110
-
## Constructors
111
-
112
-
- Use PHP 8 constructor property promotion in `__construct()`.
113
-
-`public function __construct(public GitHub $github) { }`
114
-
- Do not allow empty `__construct()` methods with zero parameters unless the constructor is private.
115
-
116
-
## Type Declarations
117
-
118
-
- Always use explicit return type declarations for methods and functions.
119
-
- Use appropriate PHP type hints for method parameters.
120
-
121
-
<!-- Explicit Return Types and Method Params -->
122
-
```php
123
-
protected function isAccessible(User $user, ?string $path = null): bool
124
-
{
125
-
...
126
-
}
127
-
```
128
-
129
-
## Enums
130
-
131
-
- Typically, keys in an Enum should be TitleCase. For example: `FavoritePerson`, `BestLake`, `Monthly`.
132
-
133
-
## Comments
134
-
135
-
- Prefer PHPDoc blocks over inline comments. Never use comments within the code itself unless the logic is exceptionally complex.
136
-
137
-
## PHPDoc Blocks
138
-
139
-
- Add useful array shape type definitions when appropriate.
105
+
- Use PHP 8 constructor property promotion: `public function __construct(public GitHub $github) { }`. Do not leave empty zero-parameter `__construct()` methods unless the constructor is private.
106
+
- Use explicit return type declarations and type hints for all method parameters: `function isAccessible(User $user, ?string $path = null): bool`
107
+
- Use TitleCase for Enum keys: `FavoritePerson`, `BestLake`, `Monthly`.
108
+
- Prefer PHPDoc blocks over inline comments. Only add inline comments for exceptionally complex logic.
109
+
- Use array shape type definitions in PHPDoc blocks.
- If you're creating a generic PHP class, use `php artisan make:class`.
154
124
- Pass `--no-interaction` to all Artisan commands to ensure they work without user input. You should also pass the correct `--options` to ensure correct behavior.
155
125
156
-
## Database
157
-
158
-
- Always use proper Eloquent relationship methods with return type hints. Prefer relationship methods over raw queries or manual joins.
159
-
- Use Eloquent models and relationships before suggesting raw database queries.
160
-
- Avoid `DB::`; prefer `Model::query()`. Generate code that leverages Laravel's ORM capabilities rather than bypassing them.
161
-
- Generate code that prevents N+1 query problems by using eager loading.
162
-
- Use Laravel's query builder for very complex database operations.
163
-
164
126
### Model Creation
165
127
166
128
- When creating new models, create useful factories and seeders for them too. Ask the user if they need any other things, using `php artisan make:model --help` to check the available options.
167
129
168
-
###APIs & Eloquent Resources
130
+
## APIs & Eloquent Resources
169
131
170
132
- For APIs, default to using Eloquent API Resources and API versioning unless existing API routes do not, then you should follow existing application convention.
171
133
172
-
## Controllers & Validation
173
-
174
-
- Always create Form Request classes for validation rather than inline validation in controllers. Include both validation rules and custom error messages.
175
-
- Check sibling Form Requests to see if the application uses array or string based validation rules.
176
-
177
-
## Authentication & Authorization
178
-
179
-
- Use Laravel's built-in authentication and authorization features (gates, policies, Sanctum, etc.).
180
-
181
134
## URL Generation
182
135
183
136
- When generating links to other pages, prefer named routes and the `route()` function.
184
137
185
-
## Queues
186
-
187
-
- Use queued jobs for time-consuming operations with the `ShouldQueue` interface.
188
-
189
-
## Configuration
190
-
191
-
- Use environment variables only in configuration files - never use the `env()` function directly outside of config files. Always use `config('app.name')`, not `env('APP_NAME')`.
192
-
193
138
## Testing
194
139
195
140
- When creating models for tests, use the factories for the models. Check if the factory has custom states that can be used before manually setting up the model.
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `npm run build` or ask the user to run `npm run dev` or `composer run dev`.
202
147
203
-
=== laravel/v12 rules ===
204
-
205
-
# Laravel 12
206
-
207
-
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples.
208
-
- Since Laravel 11, Laravel has a new streamlined file structure which this project uses.
209
-
210
-
## Laravel 12 Structure
211
-
212
-
- In Laravel 12, middleware are no longer registered in `app/Http/Kernel.php`.
213
-
- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`.
214
-
-`bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
215
-
-`bootstrap/providers.php` contains application specific service providers.
216
-
- The `app/Console/Kernel.php` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration.
217
-
- Console commands in `app/Console/Commands/` are automatically available and do not require manual registration.
218
-
219
-
## Database
220
-
221
-
- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost.
222
-
- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
223
-
224
-
### Models
148
+
## Deployment
225
149
226
-
-Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models.
150
+
-Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications.
0 commit comments