Laravel错误的视图路径 [英] Laravel wrong view path

查看:49
本文介绍了Laravel错误的视图路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新视图文件时,会从旧路径中获取视图文件.

When i update a view file i get the view file from the old path.

我有一个域指向我安装了laravel的IP(vps).

I have a domain that points to an IP (vps) where i have a laravel installation.

让我们将此电话称为123.com,当我访问该域时,会得到旧的查看路径,即我从其中复制laravel安装目录的文件夹的路径.

lets call this 123.com and when i visit the domain i get the old view path, a path to the folder where i copied the laravel installation from.

此文件夹的名称为var/www/111.com/

This folder is nammed var/www/111.com/

复制后,我将源代码放入var/www/123.com/

After the copy i put the source in var/www/123.com/

当我访问123.com时,我从var/www/111.com/而不是var/www/123.com/中获取查看文件

When i acccess 123.com i get view files from var/www/111.com/ instead of var/www/123.com/

我的.conf是这样的,在可用的站点中,我已经用sudo服务apache2重新启动了apache多次,没有运气.

My .conf is like this in the sites-available i have restarted apache many times with sudo service apache2 restart no luck.

<VirtualHost *:80>
    ServerName 123.com
        ServerAlias www.123.com
    ServerAdmin 123@123.com
    DocumentRoot /var/www/123.com/public_html/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

直接IP .conf看起来像这样.

The direect IP .conf looks like this.

<VirtualHost *:80>
        ServerName 111.111.dk
        DocumentRoot /var/www/111.111.dk/public/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/111.111.dk/public/>
                AllowOverride All
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

在apache2/vps中我的conf设置是否有问题?

Is the problem with my conf setup in apache2/vps?

我已使用 sudo a2dissite 111.111.dk.conf 删除了 .conf 文件,并使用 sudo/etc/init.d/apache2 force-reload重新启动了那里没有运气.

I have removed the .conf file with sudo a2dissite 111.111.dk.conf and restarted with sudo /etc/init.d/apache2 force-reload no luck there.

我也尝试过

php artisan route:clear

php artisan view:clear

那里没有运气.

亲切的问候.

推荐答案

我终于弄清楚了,这是我在laravel中的配置文件,bootstrap/cache/config.php中的路径错误.

I finaly figured it out, it was my config file in laravel, bootstrap/cache/config.php that had wrong paths.

所以我运行了 php artisan config:cache ,然后一切正常:)

so i ran php artisan config:cache and after that everything works :)

感谢您的所有帮助.

这篇关于Laravel错误的视图路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆