gpt4 book ai didi

php - 拉维尔 4 : get all registered routes

转载 作者:行者123 更新时间:2023-12-03 19:08:07 25 4
gpt4 key购买 nike

我创建辅助类

    namespace Services\Menu;

class Item extends AbstactItem {

public function add($url, $value, $attr, $params) {
$routes = \Route::getRoutes(); //return always empty
}

}

如何获取我类(class)中所有已注册的路线?

最佳答案

您可以通过在终端中运行简单的 artisan 命令来查看所有已注册的路由:

$ php artisan routes

关于php - 拉维尔 4 : get all registered routes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20371132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com