我们给应用创建了一个 default 视图,并将其放在 layouts 文件夹中,default 视图将作为整个应用的基础视图。
resources/views/layouts/default.blade.php
<!DOCTYPE html>
<html>
<head>
<title>Sample App</title>
</head>
<body>
@yield('content')
</body>
</html>
@yield('content') 是留坑,在继承的子视图中填坑显示内容:
resources/views/static_pages/home.blade.php
@extends('layouts.default')
@section('content')
<h1>主页</h1>
@stop







网友评论