Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Filament
pekral/arch-app-services
cursor
filament
resources
testing
enums
actions
forms
livewire

Filament-specific rules and conventions

Install
php artisan boost:add-skill pekral/arch-app-services

Save this content to: .cursor/rules/laravel/filament.mdc

## Resources
- Generate smoke tests for every Filament Resource.
- When changing a Resource, add or update tests and ensure they pass.
- Do not add a View page or Infolist unless explicitly requested.
- Use `Resource::getUrl('index')` with the exact Resource class.

## Enums
- When enums back model fields, prefer implementing `HasLabel`, `HasColor`, and `HasIcon` where useful.
- Use enum instances instead of hardcoded strings when an enum already exists.
- Do not append `->value` when defining enum defaults unless truly required.
- Match Filament interface return types exactly.

## Actions and Forms
- Use `->authorize('ability')` on actions.
- Do not use `Gate::authorize()` or `Gate::allows()` manually inside Filament actions.
- In Filament v4, do not specify `ignoreRecord: true` for `unique()` when it is already the default.
- Use `->schema()` instead of deprecated `->form()` on actions and filters.
- Use `->mutateDataUsing()` instead of deprecated `->mutateFormDataUsing()`.

## UI
- Use `Filament\\Support\\Icons\\Heroicon` for icons instead of raw strings.
- For custom Blade files with Tailwind, create and register a custom theme.

## Testing
- Use `Livewire::test(...)`, not `livewire(...)`.

Resources

  • Generate smoke tests for every Filament Resource.
  • When changing a Resource, add or update tests and ensure they pass.
  • Do not add a View page or Infolist unless explicitly requested.
  • Use Resource::getUrl('index') with the exact Resource class.

Enums

  • When enums back model fields, prefer implementing HasLabel, HasColor, and HasIcon where useful.
  • Use enum instances instead of hardcoded strings when an enum already exists.
  • Do not append ->value when defining enum defaults unless truly required.
  • Match Filament interface return types exactly.

Actions and Forms

  • Use ->authorize('ability') on actions.
  • Do not use Gate::authorize() or Gate::allows() manually inside Filament actions.
  • In Filament v4, do not specify ignoreRecord: true for unique() when it is already the default.
  • Use ->schema() instead of deprecated ->form() on actions and filters.
  • Use ->mutateDataUsing() instead of deprecated ->mutateFormDataUsing().

UI

  • Use Filament\\Support\\Icons\\Heroicon for icons instead of raw strings.
  • For custom Blade files with Tailwind, create and register a custom theme.

Testing

  • Use Livewire::test(...), not livewire(...).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle