Skip to content

Update Filament Guidelines #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ai/boost/core.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- You must use this tool to search for Laravel-ecosystem documentation before falling back to other approaches.
- Search the documentation before making code changes to ensure we are taking the correct approach.
- Use multiple, broad, simple, topic based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
- Do not add package names to queries, package information is already shared. Use `test resource table`, not `filament 4 test resource table`.

### Available Search Syntax
- You can and should pass multiple queries at once. The most relevant results will be returned first.
Expand Down
7 changes: 7 additions & 0 deletions .ai/filament/2/core.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Filament 2

## Version 2 Changes To Focus On
- Resources are located in `app/Filament/Resources/` directory.
- Resource pages (List, Create, Edit) are auto-generated within the resource structure.
- Forms use the `Forms\Components` namespace for form fields.
- Tables use the `Tables\Columns` namespace for table columns.
11 changes: 11 additions & 0 deletions .ai/filament/3/core.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Filament 3

## Version 3 Changes To Focus On
- Resources are located in `app/Filament/Resources/` directory.
- Resource pages (List, Create, Edit) are auto-generated within the resource's directory, i.e. `app/Filament/Resources/PostResource/Pages/`.
- Forms use the `Forms\Components` namespace for form fields.
- Tables use the `Tables\Columns` namespace for table columns.
- New RichEditor component available (`Filament\Forms\Components\RichEditor`).
- Form and table schemas now use fluent method chaining.
- Added `php artisan filament:optimize` command for production optimization.
- Requires implementing `FilamentUser` contract for production access control.
6 changes: 6 additions & 0 deletions .ai/filament/4/core.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
- A new `Repeater` component for Forms has been added.
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.

### Organize Component Classes Structure
- Schema components: `Schemas/Components/`
- Table columns: `Tables/Columns/`
- Table filters: `Tables/Filters/`
- Actions: `Actions/`
3 changes: 2 additions & 1 deletion .ai/filament/core.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- Filament is used by this application, check how and where to follow existing application conventions.
- 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.
- 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.
- Utilize static `make()` methods for consistent component initialization.

### Artisan
- 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.
Expand Down Expand Up @@ -29,7 +30,7 @@
</code-snippet>
@endverbatim

### Testing
## Testing
- It's important to test Filament functionality for user satisfaction.
- Ensure that you are authenticated to access the application within the test.
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.
Expand Down
1 change: 1 addition & 0 deletions all.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function packages(): \Laravel\Roster\PackageCollection
$enumMapping = [
'php' => \Laravel\Roster\Enums\Packages::LARAVEL, // Use Laravel as placeholder for php
'laravel' => \Laravel\Roster\Enums\Packages::LARAVEL,
'filament' => \Laravel\Roster\Enums\Packages::FILAMENT,
'fluxui-free' => \Laravel\Roster\Enums\Packages::FLUXUI_FREE,
'fluxui-pro' => \Laravel\Roster\Enums\Packages::FLUXUI_PRO,
'inertia-laravel' => \Laravel\Roster\Enums\Packages::INERTIA_LARAVEL,
Expand Down
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
"issues": "https://github.com/laravel/boost/issues",
"source": "https://github.com/laravel/boost"
},
"repositories": [
{
"type": "git",
"url": "[email protected]:laravel/mcp.git"
}
],
"require": {
"php": "^8.1|^8.2",
"guzzlehttp/guzzle": "^7.9",
Expand Down