阅读(4183) (0)

Laravel 8 数据修改

2021-07-09 14:25:43 更新

有了数据修改, telescope_entries 表可以非常快速地累积记录。 为了缓解这个问题,你应该使用 Artisan 每天运行 telescope:prune 命令:

$schedule->command('telescope:prune')->daily(); 

默认情况下,将获取超过 24 小时的所有数据。在调用命令时可以使用 hours 选项来确定保留 Telescope 数据的时间。例如,以下命令将删除 48 小时前创建的所有记录:

$schedule->command('telescope:prune --hours=48')->daily();