PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, February 3, 2022

[FIXED] Laravel php artisan produces error

 February 03, 2022     laravel, laravel-5, laravel-artisan     No comments   

Issue

I have integrated and working in a Laravel 5.4 project. I was actually configure this correctly and php artisan command was working perfectly before.But in between the development time(I have implemented the schedule task using laravel and not sure after that issue appear) it produces m error on php artisan commands. Can anybody help me on this.

The following is the error log for the command for any artisan command

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 60 in /var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:103

Stack trace:
#0 /var/www/html/projrct/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(60):

Illuminate\Routing\UrlGenerator->__construct(Object(Illuminate\Routing\RouteCollection), NULL) #1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(290): Illuminate\Routing\RoutingServiceProvider->Illuminate\Routing{closure}(Object(Illuminate\Foundation\Application)) #2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(746): Illuminate\Container\Container->Illuminate\Container{closur in /var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 103


Solution

I my case url() helper function in my filesystem.php is causing the issue. I removed it and every thing works fine.



Answered By - Awais Jameel
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing