如何解决Laravel 8 屈服函数
我只是将东西从 7 更新到 Laravel 8,我正在尝试一些简单的东西。
我的 /layouts/app 文件是
<!DOCTYPE html>
<html lang="{{ str_replace('_','-',app()->getLocale()) }}">
<head>
<Meta charset="utf-8">
<Meta name="viewport" content="width=device-width,initial-scale=1">
<Meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('siteimages/favicon.ico') }}">
<title>Daddies Control</title>
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
<!-- Styles -->
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
@yield('morehead')
</head>
<body class="font-sans antialiased">
<div class="min-h-screen bg-gray-100">
@include('layouts.navigation')
<!-- Page heading -->
<header class="bg-white shadow">
<div class="mx-auto py-6 px-4 sm:px-6 lg:px-8">
@yield('header')
</div>
</header>
<!-- Page Content -->
<main>
@yield('content')
</main>
</div>
@yield('morescripts')
</body>
</html>
我的测试仪表板文件是:
@extends('layouts.app')
@section('morehead')
<link rel="stylesheet" href="{{ asset('css/stt.css') }}">
@endsection
@section('header')
dashboard
@endsection
@section('content')
some content
@endsection
@section('morescripts')
<hr/>
a script
@endsection
'morescripts' 部分被完全忽略。我用它来添加特定的数据脚本(例如数据表)。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。