Rome
Format state of select filter
I have a select filter with a relationship:
SelectFilter::make('employee')->relationship('employee', 'name')
. I need to modify de label of each option to show ID + name instead of the name only. formatStateUsing()
is not available here.8 replies
RelationManager problem with duplicate relationship
I have a N-M relation with RelationManager:
companies
and items
and pivot table company_item
. Pivot table has a boolean obsolete
field.
The problem is that I have a ToggleColumn on this obsolete field but when a company has two same items (same item_id
but different pivot_id
, the toggle will work on first ocurrence because is taking item_id
and should take pivot_id
for this.
Instead of taking pivot_id
(2809 and 5895) is taking the item_id
.5 replies
Mutate form data before creating record on relation manager
Im trying to modify data before saving into database from
form()
on relation manager but I dont know how to do. I tried with mutateFormDataBeforeCreate()
and beforeCreate()
on create page but nothing happens.4 replies