cocosmos/filament-quick-add-select
Pros:
->quickAdd()). No need for custom controllers, routes, or middleware.Cons:
setAttribute) may need overrides.create() or firstOrCreate(), which may conflict with strict fillable/guarded rules.firstOrCreate with unique constraints).->rules().create() call, which could fire model events (e.g., created) and observers, adding overhead. Mitigate with withoutEvents() or lazy loading.withTrashed() or restore logic.morphTo or intermediate tables (e.g., many-to-many).created, saved) that should be triggered or suppressed during quick-add?Post → Author, Product → Category).| Component | Compatibility | Notes |
|---|---|---|
| Filament v3 | ✅ Full | Tested and supported. |
| Filament v2 | ⚠️ Partial | May require Filament v2 fork or polyfills. |
| Livewire | ❌ No | Not designed for standalone Livewire. |
| Inertia.js | ❌ No | Filament-specific. |
| Blade Forms | ❌ No | Requires Filament’s Select component. |
| Laravel Nova | ❌ No | Nova uses different component system. |
quickAdd().user_id in a posts table).->quickAdd() to critical paths (e.g., checkout flows, content creation).filament/forms, filament/tables).composer why-not to resolve potential overlaps.composer require cocosmos/filament-quick-add-select
Select::make('profession_id')
->relationship('profession', 'name')
->quickAdd(); // Add this line
->quickAdd(
label: fn ($term) => "Add '{$term}' as a new profession",
createUsing: fn ($term) => Profession::create(['name' => $term, 'slug' => Str::slug($term)])
)
cocosmos/filament-quick-add-select and Filament core.composer normalize to avoid version conflicts.composer.json for stability.How can I help you explore Laravel packages today?