添加描述到Laravel的路线

发布于 2025-02-11 20:59:50 字数 169 浏览 0 评论 0原文

我正在使用Laravel 8.83.17。

有没有办法向路线添加其他信息?这样的事情:

Route::get('/home', 'IndexController@index')->name('home')->description('Test');

I am using Laravel 8.83.17.

Is there a way to add an additional information to a route? Something like this:

Route::get('/home', 'IndexController@index')->name('home')->description('Test');

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

超可爱的懒熊 2025-02-18 20:59:50

框架级别没有这样的选择。
如果您需要为路线提供一些文档,请建议您查看 - https:/https:/ /Github.com/darkaonline/l5-swagger

该软件包无法解决您的问题,至少它为您提供了更好的路线概述。

there is no such option on the Framework level.
In case if you need to have some documentation for your routes, ill recommend you to look at the - https://github.com/DarkaOnLine/L5-Swagger

The package doesnt solve your problem, at least it provide you with a better overview of the routes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文