FrancescoMussi
FrancescoMussi

Reputation: 21630

Laravel4: Checkbox

I have to define a checkbox within a Laravel 4 app. But at the same time it is a Bootstrap 2.3.1 site, and i need to pass also Input::old How can i do it?

This is how it was in html:

            <label class="checkbox">
            <input type="checkbox" name="extraBed" value="extra" />
               <span class="blue"><strong class="blue"><span><i class="icon-plus"></i></span> Extra bed</span>
            </label>

This is how i have tried to write in Laravel4:

            <label class="checkbox">            
            {{ Form::checkbox('extraBed', Input::old('extraBed'), 'extra' }}
               <span class="blue"><strong class="blue"><span><i class="icon-plus"></i></span> Extra bed</span>
            </label>

But i get this error:

syntax error, unexpected ';'

Someone knows how can i do it? Thank you!

Upvotes: 1

Views: 1150

Answers (1)

samuraiseoul
samuraiseoul

Reputation: 2967

You forgot a closing tag.

{{ Form::checkbox('extraBed', Input::old('extraBed'), 'extra') }}

see if that helps!

Upvotes: 1

Related Questions