laravelurllaravel-9

Illuminate\Routing\UrlGenerator::__construct(): Argument #2 ($request) must be of type Illuminate\Http\Request, null given


No command is working, I also tried to update Composer, but the case is the same. I found a guide that said to ignore the url() and asset() method, but it did not solve the issue.

Illuminate\Routing\UrlGenerator::__construct(): Argument #2 ($request) must be of type Illumina te\Http\Request, null given, called in D:\artyir\xampp8\htdocs\boilerplate\core\vendor\laravel\
framework\src\Illuminate\Routing\RoutingServiceProvider.php on line 65


Solution

  • I got that error message because I used url() in config folder. Try not to use any url() or asset() in the config folder mainly in app.php.