Skip to content

Commit a0cbcef

Browse files
authored
Merge branch 'main' into celanup_command_2
2 parents c8e2a0e + 5d5bd53 commit a0cbcef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1047
-303
lines changed

.ai/boost/core.blade.php

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
1-
# URLs
2-
Whenever you create a URL use the `get-absolute-url` tool to ensure you're using the correct scheme, domain / IP, and port.
1+
## Boost
2+
- Boost MCP comes with powerful tools designed specifically for this application. Use them.
33

4-
# Artisan
5-
Use the `list-artisan-commands` tool when you need to call an artisan command to triple check the available parameters.
4+
## URLs
5+
- 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.
66

7-
# Tinker / Debugging
8-
You should use the `tinker` tool from Boost MCP when you need to run PHP to debug code or query Eloquent models directly.
7+
## Artisan
8+
- Use the `list-artisan-commands` tool when you need to call an artisan command to triple check the available parameters.
99

10-
Use the `database-query` tool when you only need to read from the database.
10+
## Tinker / Debugging
11+
- You should use the `tinker` tool from Boost MCP when you need to run PHP to debug code or query Eloquent models directly.
12+
- Use the `database-query` tool when you only need to read from the database.
1113

12-
# Reading browser logs
13-
Only recent browser logs will be useful, discard any that are older than two hours or so.
14+
@if(config('boost.browser_logs', true) !== false || config('boost.browser_logs_watcher', true) !== false)
15+
## Reading browser logs with the `browser-logs` tool
16+
- You can read browser logs, errors, and exceptions with the `browser-logs` tool from Boost.
17+
- Only recent browser logs will be useful, ignore old logs.
18+
@endif
1419

15-
# Searching documentation
16-
Check the docs before making code changes to ensure we are approaching this in the correct way. Use multiple simple topic based queries.
20+
## Searching documentation (critically important)
21+
- Boost comes with a powerful `search-docs` tool you should use before any other approaches. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation specific for the user's circumstance. You should pass an array of packages to filter docs on if you know you need docs for particular packages.
22+
- The 'search-docs' tool is perfect for all Laravel related packages. Laravel, Inertia, Pest, Livewire, Nova, Nightwatch, etc..
23+
- You must use this tool to search for Laravel-ecosystem docs before falling back to other approaches.
24+
- Search the docs before making code changes to ensure we are approaching this in the correct way.
25+
- Use multiple broad simple topic based queries to start, i.e. `rate limiting##routing rate limiting##routing`.
1726

18-
Boost comes with a powerful `search-docs` tool you should use before any other approaches. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation specific for the user's circumstance. You should pass an array of packages to filter docs on if you know you need docs for particular packages.
19-
20-
The 'search-docs' tool is perfect for all Laravel related packages. Laravel, Inertia, Pest, Livewire, Nova, Nightwatch, and more.
21-
22-
You must use this tool to search for Laravel-ecosystem docs before falling back to other approaches.
23-
24-
## Available search syntax
25-
You can and should pass multiple queries at once, the most relevant will be returned first. Start specific, broaden after.
27+
### Available search syntax
28+
- You can and should pass multiple queries at once, the most relevant results will be returned first.
2629

2730
1. Simple Word Searches with auto-stemming - query=authentication - finds 'authenticate' and 'auth'
28-
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "queue" AND "worker"
31+
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "rate" AND "limit"
2932
3. Quoted Phrases (Exact Position) - query="infinite scroll - Words must be adjacent and in that order
3033
4. Mixed Queries - query=middleware "rate limit" - "middleware" AND exact phrase "rate limit"
3134
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms

.ai/core.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Laravel Boost Guidelines
22
The Laravel Boost Guidelines are specifically curated by Laravel maintainers for this project. These guidelines should be followed closely to help enhance the user's experience and satisfaction.
33

4-
# Foundational Context
4+
## Foundational Context
55
This project is a Laravel app and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure we abide by these specific packages & versions.
66

77
- php - {{ PHP_VERSION }}

.ai/enforce-tests.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
- Every change must be programmatically tested. Write a new test, or update an existing test, then run the tests to make sure they pass.
1+
- Every change must be programmatically tested. Write a new test, or update an existing test, then run the affected tests to make sure they pass.
2+
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test` with a specific filename or filter.

.ai/folio/core.blade.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11

2-
- Laravel Folio is a file based router. With Laravel Folio, generating a route becomes as effortless as creating a Blade template within the correct directory.
3-
i.e. Pages are in `resources/views/pages/`. The file structure determines routes:
2+
- Laravel Folio is a file based router. With Laravel Folio, a new route is creatted for every Blade file within the correct directory. i.e. `Pages` are usually in in `resources/views/pages/` and the file structure determines routes:
43
- `pages/index.blade.php` → `/`
54
- `pages/profile/index.blade.php` → `/profile`
65
- `pages/auth/login.blade.php` → `/auth/login`
7-
- List available Folio routes using `artisan folio:list` or using Boost's `list-routes` tool.
6+
- List available Folio routes using `php artisan folio:list` or using Boost's `list-routes` tool.
87

9-
### New pages & routes
8+
### Folio: New pages & routes
109
- Always create new `folio` pages and routes using `artisan folio:page [name]` following existing naming conventions.
1110

1211
@verbatim
1312
<code-snippet name="Example folio:page commands for automatic routing" lang="shell">
13+
// Creates: resources/views/pages/products.blade.php → /products
1414
php artisan folio:page 'products'
15-
# Creates: resources/views/pages/products.blade.php → /products
1615

16+
17+
// Creates: resources/views/pages/products/[id].blade.php → /products/{id}
1718
php artisan folio:page 'products/[id]'
18-
# Creates: resources/views/pages/products/[id].blade.php → /products/{id}
1919
</code-snippet>
2020
@endverbatim
2121

@@ -29,7 +29,7 @@
2929
@endverbatim
3030

3131

32-
### Support & Docs
32+
### Folio: Support & Docs
3333
- Folio supports: middleware, serving pages from multiple paths, subdomain routing, named routes, nested routes, index routes, route parameters, and route model binding.
3434
- If available, use Boost's `search-docs` tool to use Folio to its full potential and help the user effectively.
3535

.ai/herd/core.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
- The site is made available by Herd, and will be available at: https?://[kebab-case-project-dir].test. Use the `get-absolute-url` tool to generate URLs.
1+
- The site is made available by Herd, and will be available at: https?://[kebab-case-project-dir].test. Use the `get-absolute-url` tool to generate URLs for the user to ensure user satisfaction and valid URLs.
22
- You must not run any commands to make the site available via HTTP(s). It is _always_ available through Herd.

.ai/inertia-laravel/core.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
## Inertia Core
22

3-
- Inertia.js components should be placed in the `resources/js/Pages` directory.
3+
- Inertia.js components should be placed in the `resources/js/Pages` directory, unless specified differently in the JS bundler (ie. vite.config.js).
44
- Use `Inertia::render()` for server-side routing instead of traditional Blade views.
55
<code-snippet lang="php" name="Inertia::render example">
6-
// routes/web.php example
7-
Route::get('/users', function () {
6+
// routes/web.php example
7+
Route::get('/users', function () {
88
return Inertia::render('Users/Index', [
9-
'users' => User::all()
9+
'users' => User::all()
1010
]);
11-
});
11+
});
1212
</code-snippet>

.ai/inertia-vue/core.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</code-snippet>
88

99
- For form handling, use `router.post` and related methods, do not use regular forms.
10+
@verbatim
1011
<code-snippet lang="vue" name="Form example">
1112
<script setup>
1213
import { reactive } from 'vue'
@@ -27,7 +28,7 @@ function submit() {
2728
</script>
2829

2930
<template>
30-
<h1>Create \{\{ page.modelName \}\}</h1>
31+
<h1>Create {{ page.modelName }}</h1>
3132
<form @submit.prevent="submit">
3233
<label for="first_name">First name:</label>
3334
<input id="first_name" v-model="form.first_name" />
@@ -39,3 +40,4 @@ function submit() {
3940
</form>
4041
</template>
4142
</code-snippet>
43+
@endverbatim

.ai/laravel/10/core.blade.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
## Laravel 10 Core
1+
## Laravel 10
2+
- Use `search-docs` tool, if available, to get version specific documentation.
3+
4+
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
5+
- There is no `bootstrap/app.php` application configuration in Laravel 10:
6+
- Middleware registration happens in `app/Http/Kernel.php`
7+
- Exception handling is in `app/Exceptions/Handler.php`
8+
- Console commands and schedule register in `app/Console/Kernel.php`
9+
- Rate limits likely exist in `RouteServiceProvider` or `app/Http/Kernel.php`
10+
- Model Casts: you must use `protected $casts = [];` not the `casts()` method. The `casts()` method isn't available on models in Laravel 10.

.ai/laravel/11/core.blade.php

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
1-
## Laravel 11 Core
1+
## Laravel 11
2+
- Use `search-docs` tool, if available, to get version specific documentation.
23

3-
- **No app\Console\Kernel.php** - use `bootstrap/app.php` for console configurations.
4+
@if (file_exists(base_path('app/Http/Kernel.php')))
5+
{{-- Migrated from L10 to L11, but did't migrate to the new L11 Structure --}}
6+
- This project upgraded from Laravel 10 without migrating to the new streamlined Laravel 11 file structure.
7+
- This is **perfectly fine** and recommended by Laravel. Follow the existing structure from Laravel 10. We do not to need migrate to the Laravel 11 structure unless the user explicitly requests that.
8+
9+
### Laravel 10 Structure
10+
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
11+
- There is no `bootstrap/app.php` application configuration in a Laravel 10 structure:
12+
- Middleware registration happens in `app/Http/Kernel.php`
13+
- Exception handling is in `app/Exceptions/Handler.php`
14+
- Console commands and schedule register in `app/Console/Kernel.php`
15+
- Rate limits likely exist in `RouteServiceProvider` or `app/Http/Kernel.php`
16+
@else
17+
{{-- Laravel 11 project anew, or upgraded & migrated structure --}}
18+
- Laravel 11 brought a new streamlined file structure which this project uses.
19+
20+
### Laravel 11 Structure
21+
- No middleware files in `app/Http/Middleware/`.
22+
- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
23+
- `bootstrap/providers.php` for project specific service providers.
24+
- **No app\Console\Kernel.php** - use `bootstrap/app.php` or `routes/console.php` for console configurations.
425
- **Commands auto-register** - files in `app/Console/Commands/` are automatically available.
26+
@endif
27+
28+
### Database
29+
- 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.
30+
- Laravel 11 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`
31+
32+
### Models
33+
- Casts can/should be set in a `casts()` method on a model, rather than the `$casts` property. Follow existing conventions from other models.
34+
35+
### New artisan commands
36+
- List artisan commands using Boost's MCP tool, if available. New commands:
37+
- `php artisan make:enum`
38+
- `php artisan make:class`
39+
- `php artisan make:interface`

.ai/laravel/12/core.blade.php

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
## Laravel 12 Core
1+
## Laravel 12
2+
- Use `search-docs` tool, if available, to get version specific documentation.
23

3-
- **No app\Console\Kernel.php** - use `bootstrap/app.php` for console configurations.
4+
@if (file_exists(base_path('app/Http/Kernel.php')))
5+
{{-- Migrated from L10 to L12, but did't migrate to the new L11 Structure --}}
6+
- This project upgraded from Laravel 10 without migrating to the new streamlined Laravel file structure.
7+
- This is **perfectly fine** and recommended by Laravel. Follow the existing structure from Laravel 10. We do not to need migrate to the new Laravel structure unless the user explicitly requests that.
8+
9+
### Laravel 10 Structure
10+
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
11+
- There is no `bootstrap/app.php` application configuration in a Laravel 10 structure:
12+
- Middleware registration happens in `app/Http/Kernel.php`
13+
- Exception handling is in `app/Exceptions/Handler.php`
14+
- Console commands and schedule register in `app/Console/Kernel.php`
15+
- Rate limits likely exist in `RouteServiceProvider` or `app/Http/Kernel.php`
16+
@else
17+
{{-- Laravel 12 project anew, or upgraded & migrated structure --}}
18+
- Laravel brought a new streamlined file structure which this project uses.
19+
20+
### Laravel file Structure
21+
- No middleware files in `app/Http/Middleware/`.
22+
- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
23+
- `bootstrap/providers.php` for project specific service providers.
24+
- **No app\Console\Kernel.php** - use `bootstrap/app.php` or `routes/console.php` for console configurations.
425
- **Commands auto-register** - files in `app/Console/Commands/` are automatically available.
26+
@endif
27+
28+
29+

0 commit comments

Comments
 (0)