<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
public function home()
{
return view('home.home');
}
}
我的路线列表
我尝试了不同的中间Wares,我也更改了此api.route 我已经删除了:
//Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
//});
请帮助我开始发疯。
php artisan route:clear
在我的情况下:
php artisan optimize
php artisan optimize:clear
解决问题
php artisan optimize:clear
php artisan route:clear
如果您面对这个问题,只需运行此命令
上面的命令将清除所有路由,文件和配置,并继续为其创建新的缓存。
使用以下命令:php artisan cache:clear
php artisan route:cache
php artisan config:cache
php artisan view:clear
在我的案件中,我通过运行解决此问题:
PHP工匠缓存:clear
命令4次。更有用的命令:
PHPARTISAN CACHE:清除#清除您的应用程序缓存。PHP工匠视图:清除#如果您想 清除视图缓存
php artisan optimize
php artisan optimize:clear
对我有用php artisan serve
php artisan route:clear
清除路由缓存
php artisan route:clear
php artisan route:clear
您可以使用以下命令-
php artisan route:clear
or