I am using laravel 5.5 I have a multi-select dropdown. if I don't select any value it generates an error. "implode(): Invalid arguments passed"
<select multiple="multiple" name="language[]">
@foreach($language_data as $language)
<option value=""></option>
@endforeach
</select>
Controller
$language = $request->input('language');
$language = implode(',', $language);
DB::table('language')->insert(['language' => $language,]);
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2E3zb9F
via IFTTT
Aucun commentaire:
Enregistrer un commentaire