Laravel5:未找到查看 [app]。资源/视图/身份验证/login.blade.php
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29067388/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel5: View [app] not found. resources/views/auth/login.blade.php
提问by lHoLlowMaNl
I'm using Laravel 5 and I have some problems. When I want to access the login on my subdomain
我正在使用 Laravel 5,但遇到了一些问题。当我想访问我的子域上的登录名时
-> http://dev.miweb.com/auth/login
-> http://dev.miweb.com/auth/login
it says:
它说:
ErrorException in FileViewFinder.php line 140: View [app] not found. (View:
/home1/miweb/public_html/subdomains/dev/resources/views/auth/
login.blade.php)
I don't understand what is the problem. For example, if I come in without the subdomain the file is found.
我不明白有什么问题。例如,如果我在没有子域的情况下进入,则会找到该文件。
-> http://miweb.com/subdomains/dev/resources/views/auth/login.blade.php
-> http://miweb.com/subdomains/dev/resources/views/auth/login.blade.php
This file is on my host. It is very confusing because it works on my localhost.
这个文件在我的主机上。这非常令人困惑,因为它适用于我的本地主机。
Could the problem be caused by the subdomain? What is the solution?
问题可能是由子域引起的吗?解决办法是什么?
Thank you
谢谢
回答by Limon Monte
As you can see in the source of login.blade.php template, it extends layout which is called app
:
正如您在 login.blade.php 模板的源代码中看到的那样,它扩展了名为的布局app
:
@extends('app')
So, probably there's no app.blade.php
file in resources/views
folder. It should be there in order to display the login form.
所以,app.blade.php
文件resources/views
夹中可能没有文件。它应该在那里以显示登录表单。
回答by hrboy
I set it as: @extends('layouts.app')
. It works well.
我设置为:@extends('layouts.app')
。它运作良好。
回答by vishal
set it as: @extends('app') and then we will get it
将其设置为:@extends('app') 然后我们将得到它
回答by Awais Nasir
in previous versions of laravel..master page i.e app.blade.php was present in views folder but in version 5.4 and in upcoming 5.5 its in the separate layouts folder so now code will be @extends('layouts.app')
在先前版本的 laravel..master 页面中,即 app.blade.php 存在于视图文件夹中,但在 5.4 版和即将推出的 5.5 版中,它位于单独的布局文件夹中,因此现在代码将是 @extends('layouts.app')
回答by AbdulBasit
I had the same issue I was following the tutorial https://www.flynsarmy.com/2015/02/creating-a-basic-todo-application-in-laravel-5-part-2/but I created the app.blade.php inside my sub folder. I moved it under the resources/views/ and it worked properly.
我在遵循教程https://www.flynsarmy.com/2015/02/creating-a-basic-todo-application-in-laravel-5-part-2/ 时遇到了同样的问题,但我创建了该应用程序。我的子文件夹中的blade.php。我把它移到资源/视图/下,它工作正常。