sevenshores / artisan-route-find
Artisan 控制台命令 route:find
v1.1.0
2016-10-08 16:31 UTC
Requires
- illuminate/console: 5.1.*|5.2.*|5.3.*
This package is not auto-updated.
Last update: 2024-09-14 19:36:48 UTC
README
我在处理一些可能有100多条路由的基于Laravel的应用时发现,快速找到所需的内容会有些烦恼。
artisan route:list
+ grep
大多数情况下是可行的,但我最终制作了一个bash函数来实现这一点,同时也从结果中删除了额外的空白字符。然后我想,“嘿,如果框架中内置了这个功能会很好。”就像 artisan route:find
这样的功能。
所以,这就是它,一个概念验证的东西。
安装和设置
composer require sevenshores/artisan-route-find
通过将其添加到 app/Console/Kernel
来注册命令
protected $commands = [ \SevenShores\RouteFinder\RouteFindCommand::class, ];
用法
现在你可以做类似的事情
php artisan route:find api/files
并且可以删除结果中的额外空白字符
php artisan route:find api/files --trim