Skip to content
Advertisement

Laravel Backpack checklist array storing ids instead of name values

I made a checklist with the possible sizes of a certain product but its storing the ids instead of the specific size.

This is the size field display.

I have the size field code like this:

JavaScript

How do I change it to store the size’s name?

Advertisement

Answer

I solved this by creating a pivot table between merch and sizes and then changing the type of the column size.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement