Reputation: 1179
This is my route
Route::get('login', function(){
return View::make('admins.login');
});
This is my admins/login.blade.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
{{ Form::open(array('route' => 'admins.store', 'class' => 'loginClass')) }}
<ul>
<li>
{{ Form::text('username', '', array('placeholder' => 'Username'))}}
<span>test</span>
</li>
</ul>
{{ Form::close() }}
@stop
</body>
</html>
The result is empty page. However, when the change the admins/login.blade.php
to:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
TEST TEST TEST
</body>
</html>
I got TEST TEST TEST
printed in the browser.
what am I missing wrong please?
Upvotes: 1
Views: 411
Reputation: 10114
Your blade page includes the @stop
within it, but there's no accompanying @section
tag.
It should look like this:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
{{ Form::open(array('route' => 'admins.store', 'class' => 'loginClass')) }}
<ul>
<li>
{{ Form::text('username', '', array('placeholder' => 'Username'))}}
<span>test</span>
</li>
</ul>
{{ Form::close() }}
</body>
</html>
Upvotes: 2