Carbrand::all()->pluck('carbrand_name', 'id') is causing incorrect integer value: '"2"' error
I have this in my select box in Form:
in the Form for create resource is causing this error on Save:
I guess it is trying to save a string instead of integer - which the column in migration is saved to.
How to force Filament to convert the id to integer when saving?
Is there any other way to do it without pluck?
1 Reply
Solution
Cast it as an integer in your model.