Created
March 4, 2019 08:05
-
-
Save stefanzweifel/6486ca706919bc2a00243351ba646458 to your computer and use it in GitHub Desktop.
Calculate the number of routes in a Laravel Project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return collect(Route::getRoutes()) | |
->reject(function ($item) { | |
return starts_with($item->uri, 'horizon'); | |
}) | |
->reject(function ($item) { | |
return starts_with($item->uri, 'nova'); | |
}) | |
->reject(function ($item) { | |
return starts_with($item->uri, '__clockwork'); | |
}) | |
->reject(function ($item) { | |
return starts_with($item->uri, 'themsaid'); | |
}) | |
->pluck('uri') | |
->count(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment