Support the ongoing development of Laravel.io →
Input Views Forms
Last updated 2 years ago.
0

I had similar issue, as i remember I did smth like this

$keys = array_fill_keys(array('key1', 'key2', ...), false);

$checkboxes = array_merge($keys, Input::all());

The other option is to put hidden inputs with default values in to the form.

Well, maybe there are better solutions :)

Last updated 2 years ago.
0

Thank you luknei, it worked just fine, and it's way better than my solution ;)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

teeyo teeyo Joined 14 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.