Search code examples
phplaravellaravel-artisan

make:resource and make:factory command cannot be found


I am trying to create an API Resource in Laravel 5.4 and also 5.6 and by some reason when I create type the make:resource command, it says cannot be found. Any assistance will be greatly appreciated. And the make:factory as well cannot be found

this is the command i run

Felix@DESKTOP-O26O7PO MINGW64 /c/wamp/www/larticles $ php artisan make:resource exampleresource

Command make:resource is not defined.


Solution

  • What I did was to upgrade to laravel 5.5 and php to version 7.1.16 because laravel >= 5.5 requires php >=7 to run and after that, I run composer update to update my settings and it worked perfectly after running php artisan list. I can now run the make:resource and make:factory. Thanks for the contributions.