dev21
dev21

Reputation: 11

laravel5 form not displayed on browser

My register.blade.php file -

{{ Form::open(array('url'=>'register'))}}
        {{ Form::label('email','Email Address')}}
        {{ Form::text('email')}}

        {{ Form::label('username','Username')}}
        {{ Form::text('username')}}

        {{ Form::label('password','Password')}}
        {{ Form::password('password')}}

        {{ Form::submit('Sign up')}}

    {{ Form::close()}}

But I have get raw html form on bowser window with html tags i.e form not created

Upvotes: 1

Views: 86

Answers (1)

Laurence
Laurence

Reputation: 60058

In Laravel 5 the blades changed. You need to use {!! !!} if you want to post unescaped text

{!! Form::open(array('url'=>'register')) !!}
    {!! Form::label('email','Email Address') !!}
    {!! Form::text('email') !!}

    {!! Form::label('username','Username') !!}
    {!! Form::text('username') !!}

    {!! Form::label('password','Password') !!}
    {!! Form::password('password') !!}

    {!! Form::submit('Sign up') !!}

{!! Form::close() !!}

Upvotes: 1

Related Questions