質問

In my routes.php file:

Route::get('register', function(){
return View::make('register');
});

with my register view as so:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Register</title>
</head>
<body>
 <h2>Register!</h2>
  {{ Form::open(array('url' => 'register')) }}
  {{ Form::close() }}
 </body>
</html>

However the stuff between the braces fails to generate any HTML at all? All I see is:

{{ Form::open(array('url' => 'register')) }}
{{ Form::close() }}

in the browser when really

<form method="POST" action="http://localhost:8000/register" accept-charset="UTF-8">
 <input name="_token" type="hidden" value="1gDaHZGie4TwE47wIT7T7uUU5hQOKu8hfFHG6Dwj">
</form>

should be displayed? Have you seen this before?

役に立ちましたか?

解決

Add .blade.php to your view file name

You probably have your file named view.php

You need to name your file view.blade.php

他のヒント

My problem here was that I had used double-curly brackets: {{ some code here }} instead of using a curly followed by two exclamation marks: {!! some code here !!}. Laravel 5.1 on PHP 5.5.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top