I m facing a problem whenever i call php artisan route:list it give me error [ErrorException] Undefined index: REQUEST_URI
I know its occuring due to $_SERVER['REQUEST_URI'] but i have added this code in whole project so can we have any alternate solution for this so that i can get route list
you need to review the use of this. Did you know that this and other server variables are available through the Request object?
anyway, that aside, you have a problem with your use of this because artisan commands boot the framework and DO NOT create a request_uri because artisan is not a http request
I think if you switch to Request you will have better luck