Closed lyongdee closed 5 years ago
@lyongdee Can you run php artisan
successfully ? Or it is also throwing the same error ?
@sudkumar php artisan
is ok, and other commands is ok
The problem is definitely in your code - It's triggered from your controller.
Even though it may work fine through HTTP - this is irrelevant, because you are not considering what affect your code has when the controller is bootstrapped from CONSOLE for the purposes of that command. This may not matter at all, but if you want to run that command, you need to take this into consideration.
Actual Behaviour
As shown in the picture, when running :
$ php artisan api:routes
That's will return : Symfony\Component\Debug\Exception\FatalThrowableError : Call to a member function toArray() on nullBut the code above I wrote works fine, how to solve it.
Expected Behaviour
show
api:routes
Steps to Reproduce
List all the steps needed to reproduce the issue you're having. Make sure to include code (affected models, configurations), any screenshots and/or other resources that may help us understand what's going on.
Possible Solutions
If you have any ideas on how to solve the issue, add them here, otherwise you can omit this part.