1
In my View I have:
<select multiple="multiple" name="carga_mental[]" class="form-control select2">
@foreach($cadastros->where('key', 'carga_mental') as $carga_mental)
<option value="{{ $carga_mental->title }}"> {{ $carga_mental->title }} </option>
@endforeach
</select>
In my Controller I have:
$this->repository->update($request->all(), $id);
When I submit the form returns this error:
Array to string Conversion (SQL: update
relatorio_setores
setcarga_mental
= Comfortable Conditions, Whereid
= 4)
And he only takes the first selected item.
My intention is to record the selected items in the table in JSON format, how can I do this?
your bank accepts
json
native, ie, is already the version of Mysql that has a fieldjson
?– novic
I can’t tell @Virgilionovic, I thought it was just playing on a field like text
– Raylan Soares
There is a way to work if I want to post a proposal! but, also
$this->repository
that’s screwing up a little bit what’s inside that– novic