I am currently developing an app with Laravel 5 and suddenly the artisan stoped working!
I can\'t use a single command on it, it always return the error:
Try running with the verbose argument, like so:
php artisan ... --verbose
I've found the error!
I had a syntax error on my routes.php file...
function($id,**name**,**value**)
Forgot the $ sign and thus it found a unexpected ','.
Thank you all for the help!
Try this command:
php -S localhost:8000 -t public
Then execute it on browser, it will produce the error, just look at the error, and fix it.
Instead of executing the commands using command prompt. It will be easy to look at LOG file found at location/directory
storage/logs/laravel.log
I am sure, you can easily check the log file and fix the syntax error.
I recently ran into this same error, although the error was probably a different cause from yours. Turns out we had recently updated to PHP 7 and I hadn't upgraded yet. The issue was caused by a return type being set on a function, which wasn't supported in my local version of php. Ran an update on Homestead, which upgraded my PHP version and fixed the issue.
None of these solutions will always work.
php artisan tinker --verbose will often not give you the stack trace which will show the source of the error.
running in the browser will also not always give the error.
The solution is simple : look in storage/logs/laravel.log there the full stack trace will show
For ease of finding (if file is huge), open the file, delete all contents, run tinker and when come back only the specific error info will be there.
Hope this helps someone else