首页 > 解决方案 > Laravel 页面重定向显示 404 错误

问题描述

web.php 路线是

Route::get('/profile', [App\Http\Controllers\HomeController::class,'profile'])->name('profile');

在 HomeController 函数中

public function profile()
    {      
      return view('profile');
    }

并且 profile.blade.php 文件也存在。当尝试加载http://127.0.0.1:8000/profile链接返回 404 错误。

标签: laravel

解决方案


推荐阅读