Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aleks_st's avatar

After update to Laravel 7 php artisan not working

Hello,

after upgrading Laravel according to the docs to v7 I ran composer update. Then I'm getting this: `In UrlGenerator.php line 120:

Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in \vendor\laravel\framework\src\Illuminate\Routing\RoutingServiceProvider.php on line 65

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1`

Any idea how this could be fixed?

0 likes
4 replies
dezineHQ's avatar
dezineHQ
Best Answer
Level 30

Please make sure that you are not using any url() or asset() or other helpers functions inside your configuration files.

1 like
dezineHQ's avatar

did you run composer update on live server?

Snapey's avatar

look in the log file, and back through the stack trace to see if it gives any clue what might be causing the error. Possibly something in the service providers that get called whenever the application is bootstrapped.

aleks_st's avatar

Thanks! The problem was due to using url() in the adminLTE config

1 like

Please or to participate in this conversation.