Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMax Smith
Courses Plus Student 3,973 PointsMy form is not outputting correctly (Laravel 5)
My form is outputting the HTML. I am using laravel 5, I had to update via composer and then change the app.php.
I am now confused as to why blade is not generating my form?
<form method="POST" action="http://laravel.dev:8000/myers" accept-charset="UTF-8"><input name="_token" type="hidden" value="KZuCvZwOs6NQG9JmPfi9eaI1PqQdfF06NHaMDxvV"> <label for="title">This is the form title</label> <input name="title" type="text" id="title"> <input type="submit" value="Submit Button"> </form>
1 Answer
Max Smith
Courses Plus Student 3,973 PointsI ended up fixing the code and it outputs as expected.
I formatted my form as seen below:
<?php
{!! Form::open( array('route' => 'todos.store') ) !!}
{!! Form::label('title','This is the form title') !!}
{!! Form::text('title') !!}
{!! Form::submit('Submit Button') !!}
{!! Form::close() !!}
It worked (I have no css button class as of yet so did not include it)
thomascawthorn
22,986 Pointsthomascawthorn
22,986 PointsGreat job! In Laravel 5, Blade changed it's echo/escaped echo syntax to avoid confusion between {{ }} and {{{ }}}. The exclamation marks are meant to draw your eye to the code, because it can be dangerous to have unescaped code echo'd to the screen.