Skip to content

Commit 7bb8c80

Browse files
committed
formatting
1 parent 42dacec commit 7bb8c80

File tree

4 files changed

+43
-41
lines changed

4 files changed

+43
-41
lines changed

.ai/core.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
- {{ $package->rawName() }} ({{ $package->name() }}) - v{{ $package->majorVersion() }}
1111
@endforeach
1212

13-
@if (! empty(config('boost.project_purpose')))
14-
Application purpose: {!! config('boost.project_purpose') !!}
13+
@if (! empty(config('boost.purpose')))
14+
Application purpose: {!! config('boost.purpose') !!}
1515
@endif
1616

1717
## Conventions
@@ -26,11 +26,11 @@
2626
- Stick to existing directory structure - don't create new base folders without approval.
2727
- Do not change the application's dependencies without approval.
2828

29+
## Frontend Bundling
30+
- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `npm run build`, `npm run dev`, or `composer run dev`. Ask them.
31+
2932
## Replies
3033
- Be concise in your explanations - focus on what's important rather than explaining obvious details.
3134

3235
## Documentation Files
3336
- You must only create documentation files if explicitly requested by the user.
34-
35-
## Frontend bundling
36-
- If the user doesn't see a frontend change made, it could mean they need to run `npm run build`, `npm run dev`, or `composer run dev`. Ask them.

.ai/filament/4/core.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Filament 4
22

3-
## Version 4 Changes To Focus On
3+
### Important Version 4 Changes
44
- File visibility is now `private` by default.
55
- The `deferFilters` method from Filament v3 is now the default behavior in Filament v4, so users must click a button before the filters are applied to the table. To disable this behavior, you can use the `deferFilters(false)` method.
6-
- The `Grid`, `Section` and `Fieldset` layout components now do not span all columns by default.
6+
- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default.
77
- The `all` pagination page method is not available for tables by default.
88
- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`.
9-
- Form & Infolist layout components have been moved to `Filament\Schemas\Components`, for example Grid, Section, Fieldset, Tabs, Wizard, etc..
10-
- A new `Repeater` component for Forms.
9+
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
10+
- A new `Repeater` component for Forms has been added.
1111
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.

.ai/filament/core.blade.php

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
## Filament
2-
- Filament is used for functionality within this project, check how and where to follow existing project conventions.
2+
- Filament is by this application, check how and where to follow existing application conventions.
33
- Filament is a Server-Driven UI (SDUI) framework for Laravel. It allows developers to define user interfaces in PHP using structured configuration objects. It is built on top of Livewire, Alpine.js, and Tailwind CSS.
4-
- You can use the `search-docs` tool to get information from the official documentation when needed. This is very useful for artisan command arguments, specific code examples, testing functionality, relationship management, and ensuring you're following idiomatic practices.
4+
- You can use the `search-docs` tool to get information from the official Filament documentation when needed. This is very useful for Artisan command arguments, specific code examples, testing functionality, relationship management, and ensuring you're following idiomatic practices.
55

6-
## Artisan
7-
- You must use the Filament specific artisan commands to create new files or components for Filament. You can find these with the `list-artisan-commands` tool, or with `php artisan` and the `--help` option.
8-
- Inspect the required options, always pass `--no-interaction`, and other options with valid arguments.
6+
### Artisan
7+
- You must use the Filament specific Artisan commands to create new files or components for Filament. You can find these with the `list-artisan-commands` tool, or with `php artisan` and the `--help` option.
8+
- Inspect the required options, always pass `--no-interaction`, and valid arguments for other options when applicable.
99

10-
## Filament's Core Features
10+
### Filament's Core Features
11+
- Actions: Handle doing something within the application, often with a button or link. Actions encapsulate the UI, the interactive modal window, and the logic that should be executed when the modal window is submitted. They can be used anywhere in the UI and are commonly used to perform one-time actions like deleting a record, sending an email, or updating data in the database based on modal form input.
12+
- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more.
13+
- Infolists: Read-only lists of data.
14+
- Notifications: Flash notifications displayed to users within the application.
1115
- Panels: The top-level container in Filament that can include all other features like pages, resources, forms, tables, notifications, actions, infolists, and widgets.
1216
- Resources: Static classes that are used to build CRUD interfaces for Eloquent models. Typically live in `app/Filament/Resources`.
13-
- Tables: Interactive tables with filtering, sorting, pagination, and more.
1417
- Schemas: Represent components that define the structure and behavior of the UI, such as forms, tables, or lists.
15-
- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more.
16-
- Infolists: Read-only list of data.
17-
- Actions: Handle doing something within the app, often with a button or link. Actions encapsulate the UI, the interactive modal window, and the logic that should be executed when the modal window is submitted. They can be used anywhere in the UI and are commonly used to perform one-time actions like deleting a record, sending an email, or updating data in the database based on modal form input.
18-
- Notifications: Flash notifications to users within the app.
18+
- Tables: Interactive tables with filtering, sorting, pagination, and more.
1919
- Widgets: Small component included within dashboards, often used for displaying data in charts, tables, or as a stat.
2020

21-
## Testing
21+
### Relationships
22+
- Determine if you can use the `relationship()` method on form components when you need `options` for a select, checkbox, repeater, or when building a `Fieldset`:
23+
@verbatim
24+
<code-snippet name="Relationship example for Form Select" lang="php">
25+
Forms\Components\Select::make('user_id')
26+
->label('Author')
27+
->relationship('author')
28+
->required(),
29+
</code-snippet>
30+
@endverbatim
31+
32+
### Testing
2233
- It's important to test Filament functionality for user satisfaction.
23-
- Ensure that you are authenticated to access the app within the test.
24-
- Filament uses Livewire so start assertions with `livewire()` or `Livewire::test()`.
34+
- Ensure that you are authenticated to access the application within the test.
35+
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.
2536

26-
### Example tests
37+
### Example Tests
2738
@verbatim
28-
<code-snippet name="Filament table test" lang="php">
39+
<code-snippet name="Filament Table Test" lang="php">
2940
livewire(ListUsers::class)
3041
->assertCanSeeTableRecords($users)
3142
->searchTable($users->first()->name)
@@ -36,7 +47,7 @@
3647
->assertCanNotSeeTableRecords($users->take($users->count() - 1));
3748
</code-snippet>
3849

39-
<code-snippet name="Filament create resource test" lang="php">
50+
<code-snippet name="Filament Create Resource Test" lang="php">
4051
livewire(CreateUser::class)
4152
->fillForm([
4253
'name' => 'Howdy',
@@ -52,26 +63,17 @@
5263
]);
5364
</code-snippet>
5465

55-
<code-snippet name="Testing multiple panels (setup())" lang="php">
66+
<code-snippet name="Testing Multiple Panels (setup())" lang="php">
5667
use Filament\Facades\Filament;
68+
5769
Filament::setCurrentPanel('app');
5870
</code-snippet>
5971

60-
<code-snippet name="Calling an action in a test" lang="php">
72+
<code-snippet name="Calling an Action in a Test" lang="php">
6173
livewire(EditInvoice::class, [
6274
'invoice' => $invoice,
6375
])->callAction('send');
64-
expect($invoice->refresh())->isSent()->toBeTrue();
65-
</code-snippet>
66-
@endverbatim
6776

68-
## Relationships
69-
- Check if you can use the `relationship()` method on form components when needing `options` for a select, checkbox, repeater, or when building a Fieldset:
70-
@verbatim
71-
<code-snippet name="Relationship example for Form Select" lang="php">
72-
Forms\Components\Select::make('user_id')
73-
->label('Author')
74-
->relationship('author')
75-
->required(),
77+
expect($invoice->refresh())->isSent()->toBeTrue();
7678
</code-snippet>
7779
@endverbatim

.ai/laravel/core.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- Use `php artisan make:` commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands using the `list-artisan-commands` tool.
44
- If you're creating a generic PHP class, use `artisan make:class`.
5-
- Pass `--no-interaction` to all artisan commands to ensure they work. You should pass correct `--options` to ensure it works.
5+
- 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.
66

77
### Database
88
- Always use proper Eloquent relationship methods with return type hints. Prefer relationship methods over raw queries or manual joins.
@@ -36,7 +36,7 @@
3636
### Testing
3737
- 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.
3838
- Faker: Use methods such as `$this->faker->word()` or `fake()->randomDigit()`. Follow existing conventions whether to use `$this->faker` or `fake()`.
39-
- When creating tests make use of `php artisan make:test [options] <name>` to create a Feature test, and pass `--unit` to create a Unit test.
39+
- When creating tests, make use of `php artisan make:test [options] <name>` to create a feature test, and pass `--unit` to create a unit test. Most tests should be feature tests.
4040

4141
### Vite Error
4242
- 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`.

0 commit comments

Comments
 (0)