Skip to content

Commit d827c49

Browse files
committed
Merge branch 'feature/configure-sail-binary-path' of github.com:iWader/boost into feature/configure-sail-binary-path
2 parents fdec0c3 + a3d80e8 commit d827c49

File tree

16 files changed

+638
-36
lines changed

16 files changed

+638
-36
lines changed

.ai/foundation.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## Foundational Context
99
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.
1010

11-
- php - {{ PHP_VERSION }}
11+
- php - {{ PHP_MAJOR_VERSION }}.{{ PHP_MINOR_VERSION }}
1212
@foreach (app(\Laravel\Roster\Roster::class)->packages()->unique(fn ($package) => $package->rawName()) as $package)
1313
- {{ $package->rawName() }} ({{ $package->name() }}) - v{{ $package->majorVersion() }}
1414
@endforeach

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44
# Laravel 11
55

66
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples.
7-
@if (file_exists(base_path('app/Http/Kernel.php')))
7+
@if (file_exists(app_path('Http/Kernel.php')))
88
- This project upgraded from Laravel 10 without migrating to the new streamlined Laravel 11 file structure.
99
- This is perfectly fine and recommended by Laravel. Follow the existing structure from Laravel 10. We do not need to migrate to the Laravel 11 structure unless the user explicitly requests it.
1010

1111
## Laravel 10 Structure
12-
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
12+
- Middleware typically lives in `{{ $assist->appPath('Http/Middleware/') }}` and service providers in `{{ $assist->appPath('Providers/') }}`.
1313
- There is no `bootstrap/app.php` application configuration in a Laravel 10 structure:
14-
- Middleware registration is in `app/Http/Kernel.php`
15-
- Exception handling is in `app/Exceptions/Handler.php`
16-
- Console commands and schedule registration is in `app/Console/Kernel.php`
17-
- Rate limits likely exist in `RouteServiceProvider` or `app/Http/Kernel.php`
14+
- Middleware registration is in `{{ $assist->appPath('Http/Kernel.php') }}`
15+
- Exception handling is in `{{ $assist->appPath('Exceptions/Handler.php') }}`
16+
- Console commands and schedule registration is in `{{ $assist->appPath('Console/Kernel.php') }}`
17+
- Rate limits likely exist in `RouteServiceProvider` or `{{ $assist->appPath('Http/Kernel.php') }}`
1818
@else
1919
- Laravel 11 brought a new streamlined file structure which this project now uses.
2020

2121
## Laravel 11 Structure
22-
- In Laravel 11, middleware are no longer registered in `app/Http/Kernel.php`.
22+
- In Laravel 11, middleware are no longer registered in `{{ $assist->appPath('Http/Kernel.php') }}`.
2323
- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`.
2424
- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
2525
- `bootstrap/providers.php` contains application specific service providers.
2626
- No app\Console\Kernel.php - use `bootstrap/app.php` or `routes/console.php` for console configuration.
27-
- Commands auto-register - files in `app/Console/Commands/` are automatically available and do not require manual registration.
27+
- Commands auto-register - files in `{{ $assist->appPath('Console/Commands/') }}` are automatically available and do not require manual registration.
2828
@endif
2929

3030
## Database

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# Laravel 12
22

33
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples.
4-
@if (file_exists(base_path('app/Http/Kernel.php')))
4+
@if (file_exists(app_path('Http/Kernel.php')))
55
- This project upgraded from Laravel 10 without migrating to the new streamlined Laravel file structure.
66
- This is perfectly fine and recommended by Laravel. Follow the existing structure from Laravel 10. We do not need to migrate to the new Laravel structure unless the user explicitly requests it.
77

88
## Laravel 10 Structure
9-
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
9+
- Middleware typically lives in `{{ $assist->appPath('Http/Middleware/') }}` and service providers in `{{ $assist->appPath('Providers/') }}`.
1010
- There is no `bootstrap/app.php` application configuration in a Laravel 10 structure:
11-
- Middleware registration happens in `app/Http/Kernel.php`
12-
- Exception handling is in `app/Exceptions/Handler.php`
13-
- Console commands and schedule register in `app/Console/Kernel.php`
14-
- Rate limits likely exist in `RouteServiceProvider` or `app/Http/Kernel.php`
11+
- Middleware registration happens in `{{ $assist->appPath('Http/Kernel.php') }}`
12+
- Exception handling is in `{{ $assist->appPath('Exceptions/Handler.php') }}`
13+
- Console commands and schedule register in `{{ $assist->appPath('Console/Kernel.php') }}`
14+
- Rate limits likely exist in `RouteServiceProvider` or `{{ $assist->appPath('Http/Kernel.php') }}`
1515
@else
1616
- Since Laravel 11, Laravel has a new streamlined file structure which this project uses.
1717

1818
## Laravel 12 Structure
19-
- In Laravel 12, middleware are no longer registered in `app/Http/Kernel.php`.
19+
- In Laravel 12, middleware are no longer registered in `{{ $assist->appPath('Http/Kernel.php') }}`.
2020
- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`.
2121
- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
2222
- `bootstrap/providers.php` contains application specific service providers.
23-
- The `app\Console\Kernel.php` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration.
24-
- Console commands in `app/Console/Commands/` are automatically available and do not require manual registration.
23+
- The `{{ $assist->appPath('Console/Kernel.php') }}` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration.
24+
- Console commands in `{{ $assist->appPath('Console/Commands/') }}` are automatically available and do not require manual registration.
2525
@endif
2626

2727
## Database

.ai/livewire/4/skill/livewire-development/SKILL.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@
4747

4848
### Choosing a Component Format
4949

50-
Before creating a component, check `config/livewire.php` for directory overrides, which change where files are stored. Then, look at existing files in those directories (defaulting to `app/Livewire/` and `resources/views/livewire/`) to match the established convention.
50+
Before creating a component, check `config/livewire.php` for directory overrides, which change where files are stored. Then, look at existing files in those directories (defaulting to `{{ $assist->appPath('Livewire/') }}` and `resources/views/livewire/`) to match the established convention.
5151

5252
### Component Format Reference
5353

5454
| Format | Flag | Class Path | View Path |
5555
|--------|------|------------|-----------|
5656
| Single-file (SFC) | default | — | `resources/views/livewire/create-post.blade.php` (PHP + Blade in one file) |
57-
| Multi-file (MFC) | `--mfc` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` |
58-
| Class-based | `--class` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` |
57+
| Multi-file (MFC) | `--mfc` | `{{ $assist->appPath('Livewire/CreatePost.php') }}` | `resources/views/livewire/create-post.blade.php` |
58+
| Class-based | `--class` | `{{ $assist->appPath('Livewire/CreatePost.php') }}` | `resources/views/livewire/create-post.blade.php` |
5959
| View-based | ⚡ prefix | — | `resources/views/livewire/create-post.blade.php` (Blade-only with functional state) |
6060

61-
Namespaced components map to subdirectories: `make:livewire Posts/CreatePost` creates files at `app/Livewire/Posts/CreatePost.php` and `resources/views/livewire/posts/create-post.blade.php`.
61+
Namespaced components map to subdirectories: `make:livewire Posts/CreatePost` creates files at `{{ $assist->appPath('Livewire/Posts/CreatePost.php') }}` and `resources/views/livewire/posts/create-post.blade.php`.
6262

6363
### Single-File Component Example
6464

.ai/tailwindcss/3/skill/tailwindcss-development/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tailwindcss-development
3-
description: "Styles applications using Tailwind CSS v3 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes."
3+
description: "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."
44
license: MIT
55
metadata:
66
author: laravel

.ai/tailwindcss/4/skill/tailwindcss-development/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tailwindcss-development
3-
description: "Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes."
3+
description: "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."
44
license: MIT
55
metadata:
66
author: laravel

.ai/tailwindcss/core.blade.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/Install/GuidelineAssist.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Illuminate\Database\Eloquent\Model;
88
use Illuminate\Support\Collection;
9+
use Illuminate\Support\Str;
910
use Laravel\Boost\Install\Assists\Inertia;
1011
use Laravel\Roster\Enums\NodePackageManager;
1112
use Laravel\Roster\Enums\Packages;
@@ -272,6 +273,11 @@ public function sailBinaryPath(): string
272273
return Sail::binaryPath();
273274
}
274275

276+
public function appPath(string $path = ''): string
277+
{
278+
return ltrim(Str::after(app_path($path), base_path()), DIRECTORY_SEPARATOR);
279+
}
280+
275281
/**
276282
* @return Collection<string, Skill>
277283
*/

src/Mcp/Boost.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Laravel\Boost\Mcp\Methods\CallToolWithExecutor;
88
use Laravel\Boost\Mcp\Prompts\LaravelCodeSimplifier\LaravelCodeSimplifier;
99
use Laravel\Boost\Mcp\Prompts\UpgradeInertiav3\UpgradeInertiaV3;
10+
use Laravel\Boost\Mcp\Prompts\UpgradeLaravelv13\UpgradeLaravelV13;
1011
use Laravel\Boost\Mcp\Prompts\UpgradeLivewirev4\UpgradeLivewireV4;
1112
use Laravel\Boost\Mcp\Tools\ApplicationInfo;
1213
use Laravel\Boost\Mcp\Tools\BrowserLogs;
@@ -111,6 +112,7 @@ protected function discoverPrompts(): array
111112
return $this->filterPrimitives([
112113
LaravelCodeSimplifier::class,
113114
UpgradeInertiaV3::class,
115+
UpgradeLaravelV13::class,
114116
UpgradeLivewireV4::class,
115117
], 'prompts');
116118
}

src/Mcp/Prompts/UpgradeInertiav3/UpgradeInertiaV3.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,19 @@ class UpgradeInertiaV3 extends Prompt
2222

2323
public function shouldRegister(Roster $roster): bool
2424
{
25-
return $roster->uses(Packages::INERTIA_LARAVEL)
26-
|| $roster->uses(Packages::INERTIA_REACT)
27-
|| $roster->uses(Packages::INERTIA_VUE)
28-
|| $roster->uses(Packages::INERTIA_SVELTE);
25+
if ($roster->uses(Packages::INERTIA_LARAVEL)) {
26+
return true;
27+
}
28+
29+
if ($roster->uses(Packages::INERTIA_REACT)) {
30+
return true;
31+
}
32+
33+
if ($roster->uses(Packages::INERTIA_VUE)) {
34+
return true;
35+
}
36+
37+
return $roster->uses(Packages::INERTIA_SVELTE);
2938
}
3039

3140
public function handle(): Response

0 commit comments

Comments
 (0)