Also Asked on StackOverflow http://stackoverflow.com/questions/43884202/laravel-artisan-make-command-issue
May 9, 2017
3
Level 1
Issue with artisan make command.
I am trying to make a middleware using artisan php artisan make:middleware AuthorizedUserOnly but I get ErrorException like below.
file_get_contents(/mysite.com/www/local/composer.json) Failed to open stream no such file or directory.
This is my document root.
-local
-Laravel application folders
-index.php
-composer.json
.htaccess
I changed my directory structure to work with shared hosting. And It was working fine.
KEY NOTES
- Other
artisancommands work. Like I triedphp artisan route:list&php artisan config:cache&php artisan tinker. - This directory structure works fine.But as the error says that it is trying to find
composer.jsoninlocaldirectory while it is ondocument root. -
php artisan make:modelcommand spits the sameException
What could be the possible issue and solution ?
Please or to participate in this conversation.