php artisan command failure and composer update error
Hello,
I have developed one site and recently move it to client server. However when I try to update the composer it giving me some unexpected error as follow
PHP artisan optimize
[ErrorException]
Invalid argument supplied for foreach()
Content-type: text/html; charset=UTF-8
Script PHP artisan optimize handling the post-update-cmd event returned with error code 1
Then when I try to run the command php artisan the error as follow.
[ErrorException]
Invalid argument supplied for foreach()
Content-type: text/html; charset=UTF-8
Actually my site loading properly. When I logged into the site and navigate some links so it gets automatically log out without clicking on logout button. This is the reason I just want to clear the cache using artisan command. So I found there is some error related to project code which might be creating the problem.
It can be set in one of the config files... I believe 'session.php', but I'm not at my computer to confirm that. You can set it to '.example.com', where example is your domain, the prefixed period lets it match all sub domains (eg. 'help.example.com').
I'd put it in my env file since it will vary from development to production...