Support the ongoing development of Laravel.io →
posted 9 years ago
Forms

I'm trying to make an upload form. I've required "illuminate/html": "5.0.*@dev" and inlcuded the facades and service provider in app.php. Now I'm adding the following code to my statuses.blade.php file

 {{ Form::open(array('url'=>'form-submit','files'=>true)) }}

            {{ Form::label('file','File',array('id'=>'','class'=>'')) }}
            {{ Form::file('file','',array('id'=>'','class'=>'')) }}

but it shows as like the following in the browser

<form method="POST" action="http://turksinhouston.app:8000/form-submit" accept-charset="UTF-8" enctype="multipart/form-data"><input name="_token" type="hidden" value="K446lyma4kgM62qB9WlgYGY4bO1zLt2QAy57YWQ5"> <label for="file" id="" class="">File</label> <input name="file" type="file" id="file"> 

I don't know why but it returns as string not as form elements.

Last updated 2 years ago.
0

In Laravel 5, anything inside double curly brackets is escaped for security reasons - this is why it appears as text in your browser. Use {!! !!} instead, to output unescaped text (such as HTML).

http://laravel.com/docs/5.0/templates#other-blade-control-structures

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.

© 2025 Laravel.io - All rights reserved.