Relation managers en filamentphp forms

  1. Agregar RelationManager como componente Livewire:

     use Filament\Forms\Components\Livewire;
    
     Livewire::make(YourRelationManager::class, fn (Page $livewire, YourModel $record) => [
         'ownerRecord' => $record,
         'pageClass' => $livewire::class,
     ]),
    
  2. Agregar en el EditModel

     use Filament\Actions\Action;
    
     protected function getSaveFormAction(): Action
     {
         return parent::getSaveFormAction()
             ->submit(null)
             ->action('save');
     }
    

Referencias

0
Subscribe to my newsletter

Read articles from Alberto Benavides directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Alberto Benavides
Alberto Benavides