我是Laravel的新手,请解释一下可能需要做什么改变,因为我不懂任何速记短语,或者在这个框架上有任何“常识”。非常感谢。
问题:将<h1> class="text-3xl font-bold underline">Hello world!</h1>"添加到空白blade.php文件时无法工作。
步骤: 0。跟踪正式安装说明。
"./resources/**/*.blade.php", "./resources/**/*.js", "./resources/**/*.vue",中配置模板路径@tailwind base; @tailwind components; @tailwind utilities;中@vite(['resources/css/app.css', 'resources/js/app.js'])存在于app.blade.php中主要问题:
如何将尾风CSS应用于Laravel 9中的所有叶片视图?
关注点1:
我是否必须在将来的每一页的头上手动应用@vite('resources/css/app.css')?
关注点2:
它不应该自动应用于所有blade.php文件,因为步骤1和步骤3已经正确完成了?
更新:所有来自正式文档的说明都已完成。它运行良好,但是如果不将@vite('resources/css/app.css')直接添加到index.blade.php中,顺风样式仍然不能工作。
谢谢你帮我学习。
发布于 2022-10-15 16:05:15
you should make folder layouts and into folder make main.blade.php
-------------------------
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body >
@yield('content')
</body>
</html>
------------------------------
and in other page for example index.blade.php
@extends('layouts.main')
@section('title', 'Index')
@section('content')
@endsectionhttps://stackoverflow.com/questions/74080816
复制相似问题