Reputation: 12913
So I have written the following route:
Route::get('/login', function() {
return View::make('login.form');
});
This is the view:
@extends('layouts.master')
@section('content')
<div class="form-section">
{{ Form::open(
array(
'url' => 'login-submit',
'method' => 'POST'
)
)
}}
{{ Form::submit('Authorize With AisisPlatform') }}
{{ Form::close() }}
@stop
This is exactly what I see when I look at the page:
<form method="POST" action="http://app-response.tracking/login-submit" accept-charset="UTF-8"><input name="_token" type="hidden" value="7xHzX20h1RZBnkTP2CRraZVsAfSQIfVP61mBiFtN"> <input type="submit" value="Authorize With AisisPlatform"> </form>
Um..... Shouldn't the form be well .... and actual form? Why did it render out the html as a string? How do I make it render the actual form submit button?
Upvotes: 3
Views: 1256
Reputation: 153030
The default echo braces: {{ ... }}
escape HTML by default, to prevent HTML injection.
You should use {!! .. !!}
to print raw HTML. For example:
{!! Form::submit('Authorize With AisisPlatform') !!}
Upvotes: 5