php artisan –version not working in laravel it throws error-In UrlGenerator.php line 111: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in

By | February 27, 2019

C:\xampp\htdocs\myproj>php artisan –version

While executing this command it throws the below error.

Solution:
Normaly this issue will happen if the config files contains url(). Please remove all the url() related things from the config.php
Or comment all the code and try the above command once more it will show properly.

In UrlGenerator.php line 111:

Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be
an instance of Illuminate\Http\Request, null given, called in C:\xampp\htd
ocs\myproj\vendor\laravel\framework\src\Illuminate\Routing\RoutingServi
ceProvider.php on line 61