diff --git a/.ai/filament/2/core.blade.php b/.ai/filament/2/core.blade.php deleted file mode 100644 index 2bbd6cc1..00000000 --- a/.ai/filament/2/core.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -## 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. diff --git a/.ai/filament/3/core.blade.php b/.ai/filament/3/core.blade.php deleted file mode 100644 index 68f4d2b0..00000000 --- a/.ai/filament/3/core.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -## 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 - e.g., `app/Filament/Resources/PostResource/Pages/`. -- Forms use the `Forms\Components` namespace for form fields. -- Tables use the `Tables\Columns` namespace for table columns. -- A new `Filament\Forms\Components\RichEditor` component is available. -- 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. diff --git a/.ai/filament/4/core.blade.php b/.ai/filament/4/core.blade.php deleted file mode 100644 index 91395ec6..00000000 --- a/.ai/filament/4/core.blade.php +++ /dev/null @@ -1,17 +0,0 @@ -## Filament 4 - -### Important Version 4 Changes -- File visibility is now `private` by default. -- 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. -- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default. -- The `all` pagination page method is not available for tables by default. -- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`. -- 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/` diff --git a/.ai/filament/core.blade.php b/.ai/filament/core.blade.php deleted file mode 100644 index a5a36ee9..00000000 --- a/.ai/filament/core.blade.php +++ /dev/null @@ -1,80 +0,0 @@ -## Filament -- 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. -- Inspect the required options, always pass `--no-interaction`, and valid arguments for other options when applicable. - -### Filament's Core Features -- 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. -- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more. -- Infolists: Read-only lists of data. -- Notifications: Flash notifications displayed to users within the application. -- Panels: The top-level container in Filament that can include all other features like pages, resources, forms, tables, notifications, actions, infolists, and widgets. -- Resources: Static classes that are used to build CRUD interfaces for Eloquent models. Typically live in `app/Filament/Resources`. -- Schemas: Represent components that define the structure and behavior of the UI, such as forms, tables, or lists. -- Tables: Interactive tables with filtering, sorting, pagination, and more. -- Widgets: Small component included within dashboards, often used for displaying data in charts, tables, or as a stat. - -### Relationships -- 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`: -@verbatim - -Forms\Components\Select::make('user_id') - ->label('Author') - ->relationship('author') - ->required(), - -@endverbatim - -## 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()`. - -### Example Tests -@verbatim - - livewire(ListUsers::class) - ->assertCanSeeTableRecords($users) - ->searchTable($users->first()->name) - ->assertCanSeeTableRecords($users->take(1)) - ->assertCanNotSeeTableRecords($users->skip(1)) - ->searchTable($users->last()->email) - ->assertCanSeeTableRecords($users->take(-1)) - ->assertCanNotSeeTableRecords($users->take($users->count() - 1)); - - - - livewire(CreateUser::class) - ->fillForm([ - 'name' => 'Howdy', - 'email' => 'howdy@example.com', - ]) - ->call('create') - ->assertNotified() - ->assertRedirect(); - - assertDatabaseHas(User::class, [ - 'name' => 'Howdy', - 'email' => 'howdy@example.com', - ]); - - - - use Filament\Facades\Filament; - - Filament::setCurrentPanel('app'); - - - - livewire(EditInvoice::class, [ - 'invoice' => $invoice, - ])->callAction('send'); - - expect($invoice->refresh())->isSent()->toBeTrue(); - -@endverbatim diff --git a/README.md b/README.md index b49a1ab7..6274da9a 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,6 @@ Laravel Boost includes AI guidelines for the following packages and frameworks. | Core & Boost | core | | Laravel Framework | core, 10.x, 11.x, 12.x | | Livewire | core, 2.x, 3.x | -| Filament | core, 4.x | | Flux UI | core, free, pro | | Herd | core | | Inertia Laravel | core, 1.x, 2.x |