路线存在但不起作用,删除的路线仍然有效 Laravel

Route exists but doesn't work and deleted route still works Laravel

好吧,我正在做我的项目,当我创建一条新路线时突然遇到这个问题,路线存在但它显示 404!所以我试图删除一条正在运行的现有路线,但是当我删除该路线时,它仍然有效!我以前遇到过这个问题,但我只是删除了那条路线并重新创建了另一条路线并且它工作正常但是这次它不起作用!!

这是我的一些代码 ->

$("#resetBtn").click(function () {
    $.ajax({
        url: "/reset/website/data",
        type: "POST",
        data: {
            _token: $('meta[name="csrf"]').attr("content"),
        },
        success: function (data) {
            console.log(data);
            activateNotificationSuccess("Successfully reseted.");
        },
        error: function (error) {
            console.log(error);
            activateNotificationFail("Something went very wrong !!");
        },
    });   
});

Route::post('/reset/website/data', [ColorNImageController::class, 'reset']);

如果我将其作为获取请求并使用我的浏览器直接导航,就会出现问题 ->

有人有解决办法吗?

请运行命令行:

php artisan route:clear

运行 遵循 artisan 命令

php artisan route:clear
php artisan config:cache

希望这会有所帮助。