英文:
View [pageTitle] not found
问题
这是你提供的代码和问题的翻译:
来自auth-layout.blade.php的代码
<title>@yield('pageTitle')</title>
<!--logo-->
<link rel="shortcut icon" href="./back/CCS_logo.png">
<!--Bootstrap CSS-->
<link rel="stylesheet" href="./back/css/bootstrap.min.css">
<!--Styles-->
<link rel="stylesheet" href="./back/style.css">
<!--Icon-->
<link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'>
@stack('stylesheets')
<!-- Content Page -->
@yield('content')
<script src="./back/script.js"></script>
@stack('scripts')
<script src="./back/js/bootstrap.bundle.min.js"></script>
```
登录文件login.blade.php
@extends('back.layouts.auth-layout')
@extends('pageTitle', isset($pageTitle) ? $pageTitle : 'Login')
@section('content')
这是一个登录页面
@endsection
我似乎找不到问题所在,我没有错过任何教程。
这是Illuminate抛出的错误
View\FileViewFinder: 137 findInPaths
throw new InvalidArgumentException("View [{$name}] not found.");
谢谢你的帮助!我还是一个学习Laravel框架的初学者,但在互联网上找不到解决方法。
如果你需要更多的帮助或有其他问题,请随时告诉我。
<details>
<summary>英文:</summary>
Hi I'm following a tutorial and I change a little bit the name of prefix into admin and the route was working before with empty content and then once I put some of the contents following the tutorial the login page title is not working here's the code
from auth-laout.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@yield('pageTitle')</title>
<!--logo-->
<link rel="shortcut icon" href="./back/CCS_logo.png">
<!--Bootstrap CSS-->
<link rel="stylesheet" href="./back/css/bootstrap.min.css">
<!---Styles---->
<link rel="stylesheet" href="./back/style.css">
<!--Icon----->
<link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'>
@stack('stylesheets')
</head>
<body>
<!-- Content Page -->
@yield('content')
<script src="./back/script.js"></script>
@stack('scripts')
<script src="./back/js/bootstrap.bundle.min.js"></script>
</body>
</html>
the login file login.blade.php
@extends('back.layouts.auth-layout')
@extends('pageTitle', isset($pageTitle) ? $pageTitle : 'Login')
@section('content')
this is a login page
@endsection
I can't seem to find what's the problem I haven't missed any tutorials
this is the error been throw Illuminate
\ View\ FileViewFinder: 137 findInPaths
throw new InvalidArgumentException("View [{$name}] not found.");
Thank you for helping! i'm still a beginner learning this laravel framework
find solution on internet but i can't seem to solve it
</details>
# 答案1
**得分**: 1
View [pageTitle] not found
Use this:
@section('title') {{'Login'}} @endsection
<details>
<summary>英文:</summary>
View [pageTitle] not found
Use this:
@section('title') {{''Login''}} @endsection
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论