Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to enable error reporting in laravel 4.2 for debugging

I just have installed new laravel 4.2 using composer. I make syntax mistake deliberately on my router.php to see if an appropriate exception is thrown by the application on my browser screen, but instead a got this

Whoops, looks like something went wrong

.

i have checked the app/config.php file and changed "debug" = false to "debug" = true and it is not worked for me. Still I am getting the same message.

does any body know how to configure laravel 4 to display error message on my screen?

like image 587
realtekme Avatar asked Jul 14 '14 06:07

realtekme


People also ask

How do I turn on error reporting in Laravel?

Through your config/app. php , set 'debug' => env('APP_DEBUG', false), to true . Or in a better way, check out your . env file and make sure to set the debug element to true.

How do I enable debugging in Laravel?

Enable or disable debug mode using app. Open the app. php file located in your config/app. php laravel project. Search for debug key and change true to enable debug mode and false for disabling debug mode default it will show false .

How can I get error in Laravel?

You can call any() method on $errors variable to check that there are any validation errors exist in it or not. It returns 1 if any errors exist in $errors variable. After that you can call foreach method on $errors->all() and display message using $error variable.


1 Answers

You need to change app/config/local/app.php file - and set 'debug' => true,

like image 119
Laurence Avatar answered Oct 24 '22 02:10

Laurence