How can I make a multiple selection in a single column?

Hello good morning everyone, I would like to have a column with the data of my 3 services and export it to pdf in an invoice. My schema
Select::make('servicio_id')
->label('Servicio')
->options(Servicios::all()->pluck('nombre', 'id'))
->searchable()
->multiple(),
Select::make('servicio_id')
->label('Servicio')
->options(Servicios::all()->pluck('nombre', 'id'))
->searchable()
->multiple(),
and I get this error
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '["1","2","3"]' for column `laravel_workshop`.`ordenes`.`servicio_id` at row 1
update `ordenes` SET `servicio_id` = ["1","2","3"], `ordenes`.`updated_at` = 2023-10-10 15:14:46 WHERE `id` = 7
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '["1","2","3"]' for column `laravel_workshop`.`ordenes`.`servicio_id` at row 1
update `ordenes` SET `servicio_id` = ["1","2","3"], `ordenes`.`updated_at` = 2023-10-10 15:14:46 WHERE `id` = 7
the library I use for the invoice (laravel-invoices by PovilasKorop) Help me please ? jejej kisses
No description
No description
No description
1 Reply
Patrick Boivin
Patrick Boivin9mo ago
It looks like you're trying to write to an integer column in the DB. You probably need a JSON column instead.