Shi*_*iro 2 laravel blade laravel-4
file:app/route.php
Route::get('/', function()
{
return View::make('home');
});
Run Code Online (Sandbox Code Playgroud)
file:app/views/home.blade.php
{{-- Blade comment. --}}
@extends('layouts.base')
@section('head')
<link rel="stylesheet" href="second.css" />
@stop
@section('body')
<h1>Heading</h1>
<p>Hello Home!</p>
@stop
Run Code Online (Sandbox Code Playgroud)
file:app/views/layouts/base.blade.php
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
@section('head')
<link rel="stylesheet" href="style.css" />
@show
</head>
<body>
@yield('body')
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
当我访问laravel.localhost /它只输出@extends('layouts.base')
但是,如果我删除了
{{ - 刀片评论. - }}
然后它完美地运作.
我可以知道这是什么问题吗?