View [pageTitle] not found.

huangapple go评论59阅读模式
英文:

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&#39;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&#39;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">

&lt;title&gt;@yield(&#39;pageTitle&#39;)&lt;/title&gt;

&lt;!--logo--&gt;
&lt;link rel=&quot;shortcut icon&quot; href=&quot;./back/CCS_logo.png&quot;&gt;

&lt;!--Bootstrap CSS--&gt;

&lt;link rel=&quot;stylesheet&quot; href=&quot;./back/css/bootstrap.min.css&quot;&gt;

&lt;!---Styles----&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;./back/style.css&quot;&gt;

&lt;!--Icon-----&gt;
&lt;link href=&#39;https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css&#39; rel=&#39;stylesheet&#39;&gt;
@stack(&#39;stylesheets&#39;)

</head>
<body>

	&lt;!-- Content Page --&gt;
	@yield(&#39;content&#39;)
	


&lt;script src=&quot;./back/script.js&quot;&gt;&lt;/script&gt;
@stack(&#39;scripts&#39;)
&lt;script src=&quot;./back/js/bootstrap.bundle.min.js&quot;&gt;&lt;/script&gt;

</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&#39;t seem to find what&#39;s the problem I haven&#39;t missed any tutorials

this is the error been throw Illuminate
 \ View\ FileViewFinder: 137 findInPaths
 throw new InvalidArgumentException(&quot;View [{$name}] not found.&quot;);

Thank you for helping! i&#39;m still a beginner learning this laravel framework

find solution on internet but i can&#39;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(&#39;title&#39;) {{&#39;&#39;Login&#39;&#39;}} @endsection



</details>



huangapple
  • 本文由 发表于 2023年3月12日 12:23:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/75711031.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定