저는 정말 간단하고 사용하기 쉽도록 노력하고 있습니다. 2 페이지가 있습니다. admin.blade.php 및 left.blade.php 관리자 페이지를 마스터 페이지로 사용하려고합니다. date.blade.phpLaravel 레이아웃이 작동하지 않습니다.
admin 페이지는 결과로 "test"만 인쇄하고 left.admin.php에는 아무것도 포함하지 않습니다. 무엇이 잘못되었는지를 알 수 없습니다. 미리 감사는
파일 구조는 web.php에서
-- resources
--views
*admin.blade.php
*left.blade.php
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title> @yield('title')</title>
</head>
<body>
<?php
// put your code here
?>
@yield('content')
test
<div id='footer'>
@yield('footer')
</div>
</body>
</html>
admin.blade.php
@extends('admin')
@section('content')
baran
@stop
left.blade.php route 명령이
입니다
Route::get('/admin', function() {
return view('admin');
});
주요 내용
left.blade.php
에있는 경우
@include('left')
그리고 당신은 다음 경로 변경 레이아웃으로 admin.blade.php
를 사용 : 당신이 left.blade.php
에서 날짜를 포함 시키려면
감사합니다. – rematnarab