【问题标题】:Laravel 8 error route | The GET method is not supported for this routeLaravel 8 错误路径 |此路由不支持 GET 方法
【发布时间】:2021-03-22 06:58:58
【问题描述】:

Laravel V 8 喷射流。 在我在共享主机上上传并发布项目后,我出现了这个问题 错误信息

Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException 此路由不支持 GET 方法。支持的方法: 头。

enter image description here

Route::get('/', function () {
    return view('welcome');
});

路线代码

Route::middleware(['auth:sanctum', 'verified'])->group(function () {
    Route::get('/dashboard',function () {
        return view('dashboard');
    })->name('dashboard');;

    Route::get('/upload', function () {
        return view('uploadpdf');
    })->name('upload'); 

});

【问题讨论】:

  • 您省略了此问题的关键部分之一...当您遇到此错误时,您尝试导航到什么路线?

标签: laravel routes jetstream


【解决方案1】:

如果您遇到此问题,请始终检查 .env 和配置文件中的设置 在 config.php - /bootstrap/cache/config.php 中发现错误。 我没有配置 APP_URL 之类的位置设置,并且某些目录的路径指向我的计算机 大家好运 来自 Dzsecurity 公司团队的问候帮助寻找解决方案

【讨论】:

    猜你喜欢
    • 2021-08-05
    • 2021-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-07
    • 2021-05-08
    • 2020-05-15
    相关资源
    最近更新 更多