【发布时间】:2018-09-30 10:25:34
【问题描述】:
我更改了我的 Laravel 项目名称:php artisan app:name new_name
我的项目显示错误:
Class 'app\Providers\EloquentEventServiceProvider' not found
我做了一些研究,在 StackOverflow 上找到了一个已回答的问题,建议我删除 /bootstrap/cache/config.php 文件。
我删除它并通过php artisan config:cache重新生成
现在我的项目正在展示
抱歉,找不到您要查找的页面。
我的路线/web.php 看起来像:
/** Auth Routes*/
Auth::routes();
/** Homepage Route*/
Route::get('/', function () {
return view('layout');
});
我的 .htaccess 文件如下所示:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
请帮帮我!
【问题讨论】:
-
composer du应该可以工作。如果您要使用php artisan app:name NewName,则不必使用composer du,它也可以正常工作。 -
仍然收到
Sorry, the page you are looking for could not be found. -
您确定“布局”是视图的名称吗?不是“layouts.layout”之类的吗?
标签: php laravel .htaccess caching configuration