这是关于本地主机上的路由缓存

About Localhost

I have 2 routes in my route.php file. Both are working fine. No problem in that. I was learning route:clear and route:cache and found a small problem below.

if I comment any one route in my route.php file and then run below command

php artisan route:cache

This will keep the route disabled because the route list is in cache now. Now, go to route.php file and try to remove commented route and then try to run that enabled url. still it will show 404 because I need to remove cache by using below command

php artisan route:clear

So far everything is understood in localhost. No problem in that.

After deploying on shared hosting server on godaddy

Question : How can I remove the route cache on server?

推荐答案

If you want to remove the routes cache on your server, remove this file:

bootstrap/cache/routes.php

如果你想更新它,只需运行php artisan route:cache并将bootstrap/cache/routes.php上传到你的服务器.

Laravel相关问答推荐

Inertia React中的错误文件上传更新

Laravel带S3存储器

Laravel 数据未传递到下拉框

如何在 Laravel 中使用多对一变形关系

Laravel 9 上的数组差异助手

如何提取每组 groupBy 查询的唯一值?

Laravel where 子句只返回一个数据库条目

Laravel - 如果值包含某个字符串(取自搜索输入),则查询模型

Laravel - 验证 - 如果字段为空则需要

laravel 5 中的登录事件处理

未定义的类常量App\Providers\RouteServiceProvider::HOME

Laravel:自定义或扩展通知 - 数据库模型

安装后在 Lumen 中找不到页面

脚本 php artisan clear-compiled 处理 pre-update-cmd 事件返回错误(Laravel 4.1 升级)

Guzzle 返回流空体而不是 json 体

如何在laravel中获取列值的平均值

如何在 Laravel 5.2 中使用 OR 条件将多个参数传递给中间件

如何在 Laravel 中显示动态复选框的旧数据?

Laravel 部署……有标准的方式吗?

Distinct values with pluck