Allow reorderable without fillable column?
Good evening everyone!
I am somewhat stuck on adding reorderable. I noticed that I am required to add the
However, normally I use guarded only. The catch is if I only add the sort to the fillable the whole form does not work.
Has somebody else had the same issue and if so did you resolve it or did you add all fillable columns?
I really don't want to add them all
I am somewhat stuck on adding reorderable. I noticed that I am required to add the
sort column in my fillable property.However, normally I use guarded only. The catch is if I only add the sort to the fillable the whole form does not work.
Has somebody else had the same issue and if so did you resolve it or did you add all fillable columns?
I really don't want to add them all
Solution
Looks like Filament is using Eloquent's
https://github.com/filamentphp/filament/blob/3.x/packages/tables/src/Concerns/CanReorderRecords.php
update([]) ... in which Laravel requires the sort field to be unguarded/fillable:https://github.com/filamentphp/filament/blob/3.x/packages/tables/src/Concerns/CanReorderRecords.php
GitHub
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament