user151841
user151841

Reputation: 18046

Artisan error doesn't show line number

I'm writing a console command for my Laravel 5.1 app. While developing, I'm having an error somewhere. When artisan reports the error, it doesn't give me the line number or file; I just get an error in the shell highlighted in red background:

  [ErrorException]
  Undefined variable: answerer

How do I get artisan to show me more information about where the error occurred, specifically line number and file?

Upvotes: 3

Views: 2121

Answers (1)

Frank
Frank

Reputation: 530

Since this is the first hit in Google for me, I reply here. I managed to find a solution to this issue. Simply add the -v option to artisan for getting a stacktrace, including line number.

php artisan -v survey:complete

in your case.

Upvotes: 17

Related Questions