lundi 25 avril 2016

Laravel 5.2 checkbox redirect withInput shows error - parameter expects to be string array given

{!!Form::checkbox($name->key.'[]',$checkbox->value,(isset($result[$name->key])?in_array($checkbox->value,$result[$name->key]):''))!!}

Checkbox validation, db checkbox insertion as comma seperated, and then pre populate works fine. But my issue is when i redirect errors with input, it shows error - parameter 1 to be string array given.Then I remove withInput, it does not show any errors, but the checkbox selected not prepopulated.

return redirect()->back()->withErrors($validateResult)->withInput($request->all());

Please help, is there any other option to solve this issue. Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire