You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Typically, keys in an Enum should be TitleCase. For example: `FavoritePerson`, `BestLake`, `Monthly`.
114
114
115
115
116
-
=== filament/core rules ===
117
-
118
-
## Filament
119
-
- Filament is used by this application, check how and where to follow existing application conventions.
120
-
- 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.
121
-
- 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.
122
-
- Utilize static `make()` methods for consistent component initialization.
123
-
124
-
### Artisan
125
-
- 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.
126
-
- Inspect the required options, always pass `--no-interaction`, and valid arguments for other options when applicable.
127
-
128
-
### Filament's Core Features
129
-
- 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.
130
-
- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more.
131
-
- Infolists: Read-only lists of data.
132
-
- Notifications: Flash notifications displayed to users within the application.
133
-
- Panels: The top-level container in Filament that can include all other features like pages, resources, forms, tables, notifications, actions, infolists, and widgets.
134
-
- Resources: Static classes that are used to build CRUD interfaces for Eloquent models. Typically live in `app/Filament/Resources`.
135
-
- Schemas: Represent components that define the structure and behavior of the UI, such as forms, tables, or lists.
136
-
- Tables: Interactive tables with filtering, sorting, pagination, and more.
137
-
- Widgets: Small component included within dashboards, often used for displaying data in charts, tables, or as a stat.
138
-
139
-
### Relationships
140
-
- 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`:
141
-
142
-
<code-snippetname="Relationship example for Form Select"lang="php">
143
-
Forms\Components\Select::make('user_id')
144
-
->label('Author')
145
-
->relationship('author')
146
-
->required(),
147
-
</code-snippet>
148
-
149
-
150
-
## Testing
151
-
- It's important to test Filament functionality for user satisfaction.
152
-
- Ensure that you are authenticated to access the application within the test.
153
-
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.
- 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.
206
-
- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default.
207
-
- The `all` pagination page method is not available for tables by default.
208
-
- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`.
209
-
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
210
-
- A new `Repeater` component for Forms has been added.
211
-
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.
212
-
213
-
### Organize Component Classes Structure
214
-
- Schema components: `Schemas/Components/`
215
-
- Table columns: `Tables/Columns/`
216
-
- Table filters: `Tables/Filters/`
217
-
- Actions: `Actions/`
218
-
219
-
220
116
=== laravel/core rules ===
221
117
222
118
## Do Things the Laravel Way
@@ -461,6 +357,13 @@ it('has emails', function (string $email) {
461
357
462
358
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
463
359
- `corePlugins` is not supported in Tailwind v4.
360
+
- In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed.
361
+
<code-snippet name="Extending Theme in CSS" lang="css">
362
+
@theme {
363
+
--color-brand: oklch(0.72 0.11 178);
364
+
}
365
+
</code-snippet>
366
+
464
367
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:
- Typically, keys in an Enum should be TitleCase. For example: `FavoritePerson`, `BestLake`, `Monthly`.
114
114
115
115
116
-
=== filament/core rules ===
117
-
118
-
## Filament
119
-
- Filament is used by this application, check how and where to follow existing application conventions.
120
-
- 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.
121
-
- 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.
122
-
- Utilize static `make()` methods for consistent component initialization.
123
-
124
-
### Artisan
125
-
- 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.
126
-
- Inspect the required options, always pass `--no-interaction`, and valid arguments for other options when applicable.
127
-
128
-
### Filament's Core Features
129
-
- 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.
130
-
- Forms: Dynamic forms rendered within other features, such as resources, action modals, table filters, and more.
131
-
- Infolists: Read-only lists of data.
132
-
- Notifications: Flash notifications displayed to users within the application.
133
-
- Panels: The top-level container in Filament that can include all other features like pages, resources, forms, tables, notifications, actions, infolists, and widgets.
134
-
- Resources: Static classes that are used to build CRUD interfaces for Eloquent models. Typically live in `app/Filament/Resources`.
135
-
- Schemas: Represent components that define the structure and behavior of the UI, such as forms, tables, or lists.
136
-
- Tables: Interactive tables with filtering, sorting, pagination, and more.
137
-
- Widgets: Small component included within dashboards, often used for displaying data in charts, tables, or as a stat.
138
-
139
-
### Relationships
140
-
- 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`:
141
-
142
-
<code-snippetname="Relationship example for Form Select"lang="php">
143
-
Forms\Components\Select::make('user_id')
144
-
->label('Author')
145
-
->relationship('author')
146
-
->required(),
147
-
</code-snippet>
148
-
149
-
150
-
## Testing
151
-
- It's important to test Filament functionality for user satisfaction.
152
-
- Ensure that you are authenticated to access the application within the test.
153
-
- Filament uses Livewire, so start assertions with `livewire()` or `Livewire::test()`.
- 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.
206
-
- The `Grid`, `Section`, and `Fieldset` layout components no longer span all columns by default.
207
-
- The `all` pagination page method is not available for tables by default.
208
-
- All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`.
209
-
- The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc.
210
-
- A new `Repeater` component for Forms has been added.
211
-
- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented.
212
-
213
-
### Organize Component Classes Structure
214
-
- Schema components: `Schemas/Components/`
215
-
- Table columns: `Tables/Columns/`
216
-
- Table filters: `Tables/Filters/`
217
-
- Actions: `Actions/`
218
-
219
-
220
116
=== laravel/core rules ===
221
117
222
118
## Do Things the Laravel Way
@@ -461,6 +357,13 @@ it('has emails', function (string $email) {
461
357
462
358
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
463
359
- `corePlugins` is not supported in Tailwind v4.
360
+
- In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed.
361
+
<code-snippet name="Extending Theme in CSS" lang="css">
362
+
@theme {
363
+
--color-brand: oklch(0.72 0.11 178);
364
+
}
365
+
</code-snippet>
366
+
464
367
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:
0 commit comments