From 1295383177ca6d2aaff58b9ce95fa8902a40ff12 Mon Sep 17 00:00:00 2001 From: Nzagha David Eze <33941830+zaghadon@users.noreply.github.com> Date: Sat, 16 Jul 2022 01:37:15 -0700 Subject: [PATCH 1/2] Add Flags to Route Listing, to enable listing a particular Routes file like php artisan route:list --api-only #43214 --- routing.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/routing.md b/routing.md index 743b23b1465..d74df3b9e66 100644 --- a/routing.md +++ b/routing.md @@ -152,6 +152,13 @@ Likewise, you may also instruct Laravel to only show routes that are defined by php artisan route:list --only-vendor ``` + +Additionally, you may also instruct Laravel to only show routes that are defined in a particular route path such as the api routes, the web routes, etc by providing the `--path` option when executing the `route:list` command: + +```shell +php artisan route:list --path=api +``` + ## Route Parameters From bd7999249bdaecf947ec40492953f184db683d40 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Jul 2022 09:04:18 -0500 Subject: [PATCH 2/2] Update routing.md --- routing.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/routing.md b/routing.md index d74df3b9e66..fa5f4a28123 100644 --- a/routing.md +++ b/routing.md @@ -140,23 +140,22 @@ By default, the route middleware that are assigned to each route will not be dis php artisan route:list -v ``` -In addition, you may instruct Laravel to hide any routes that are defined by third-party packages by providing the `--except-vendor` option when executing the `route:list` command: +You may also instruct Laravel to only show routes that begin with a given URI: ```shell -php artisan route:list --except-vendor +php artisan route:list --path=api ``` -Likewise, you may also instruct Laravel to only show routes that are defined by third-party packages by providing the `--only-vendor` option when executing the `route:list` command: +In addition, you may instruct Laravel to hide any routes that are defined by third-party packages by providing the `--except-vendor` option when executing the `route:list` command: ```shell -php artisan route:list --only-vendor +php artisan route:list --except-vendor ``` - -Additionally, you may also instruct Laravel to only show routes that are defined in a particular route path such as the api routes, the web routes, etc by providing the `--path` option when executing the `route:list` command: +Likewise, you may also instruct Laravel to only show routes that are defined by third-party packages by providing the `--only-vendor` option when executing the `route:list` command: ```shell -php artisan route:list --path=api +php artisan route:list --only-vendor ```