pavlen
115
4
Laravel

Blade check box value

Posted 3 years ago by pavlen

HI, have check box in Blade:

{!! Form::checkbox('reg',1,false) !!}

If box is checed,value is 1,that is ok,but when not checked,value is null.

IS there possibility to send value 0 to conttroller if box is uncheked?

P.S. I can manipulate with values in controller,of course, but just interesting is there away to do that directly in Blade...

Tnx, P

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.