Skip to content

Commit 07e193b

Browse files
authored
Merge pull request #35 from laravel/update/filament_guidelines
Update Filament Guidelines
2 parents cf9f6eb + ed45932 commit 07e193b

File tree

7 files changed

+28
-7
lines changed

7 files changed

+28
-7
lines changed

.ai/boost/core.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- You must use this tool to search for Laravel-ecosystem documentation before falling back to other approaches.
2424
- Search the documentation before making code changes to ensure we are taking the correct approach.
2525
- Use multiple, broad, simple, topic based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
26+
- Do not add package names to queries, package information is already shared. Use `test resource table`, not `filament 4 test resource table`.
2627

2728
### Available Search Syntax
2829
- You can and should pass multiple queries at once. The most relevant results will be returned first.

.ai/filament/2/core.blade.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Filament 2
2+
3+
## Version 2 Changes To Focus On
4+
- Resources are located in `app/Filament/Resources/` directory.
5+
- Resource pages (List, Create, Edit) are auto-generated within the resource structure.
6+
- Forms use the `Forms\Components` namespace for form fields.
7+
- Tables use the `Tables\Columns` namespace for table columns.

.ai/filament/3/core.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Filament 3
2+
3+
## Version 3 Changes To Focus On
4+
- Resources are located in `app/Filament/Resources/` directory.
5+
- Resource pages (List, Create, Edit) are auto-generated within the resource's directory, i.e. `app/Filament/Resources/PostResource/Pages/`.
6+
- Forms use the `Forms\Components` namespace for form fields.
7+
- Tables use the `Tables\Columns` namespace for table columns.
8+
- New RichEditor component available (`Filament\Forms\Components\RichEditor`).
9+
- Form and table schemas now use fluent method chaining.
10+
- Added `php artisan filament:optimize` command for production optimization.
11+
- Requires implementing `FilamentUser` contract for production access control.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@
99
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
1010
- 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.
12+
13+
### Organize Component Classes Structure
14+
- Schema components: `Schemas/Components/`
15+
- Table columns: `Tables/Columns/`
16+
- Table filters: `Tables/Filters/`
17+
- Actions: `Actions/`

.ai/filament/core.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Filament is used 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.
44
- 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.
5+
- Utilize static `make()` methods for consistent component initialization.
56

67
### Artisan
78
- 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.
@@ -29,7 +30,7 @@
2930
</code-snippet>
3031
@endverbatim
3132

32-
### Testing
33+
## Testing
3334
- It's important to test Filament functionality for user satisfaction.
3435
- Ensure that you are authenticated to access the application within the test.
3536
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.

all.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function packages(): \Laravel\Roster\PackageCollection
6060
$enumMapping = [
6161
'php' => \Laravel\Roster\Enums\Packages::LARAVEL, // Use Laravel as placeholder for php
6262
'laravel' => \Laravel\Roster\Enums\Packages::LARAVEL,
63+
'filament' => \Laravel\Roster\Enums\Packages::FILAMENT,
6364
'fluxui-free' => \Laravel\Roster\Enums\Packages::FLUXUI_FREE,
6465
'fluxui-pro' => \Laravel\Roster\Enums\Packages::FLUXUI_PRO,
6566
'inertia-laravel' => \Laravel\Roster\Enums\Packages::INERTIA_LARAVEL,

composer.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
"issues": "https://github.com/laravel/boost/issues",
1313
"source": "https://github.com/laravel/boost"
1414
},
15-
"repositories": [
16-
{
17-
"type": "git",
18-
"url": "[email protected]:laravel/mcp.git"
19-
}
20-
],
2115
"require": {
2216
"php": "^8.1|^8.2",
2317
"guzzlehttp/guzzle": "^7.9",

0 commit comments

Comments
 (0)