Carol.Kar
Carol.Kar

Reputation: 5355

Activating error messages in laravel 4.2

I am using laravel 4.2. It is basically a fresh installation. However, when receiving an error I get a page with:

Whoops, looks like something went wrong.

How to activate detailed error messages during development?

I appreciate your answer!

Upvotes: 0

Views: 508

Answers (2)

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111859

It's not the way you should do. You should use environments for that.

Go to bootstrap\start.php.

In:

$env = $app->detectEnvironment(array(     
    'local' => array('yourpcname'),    
));

Put your PC name here.

Now in app/config/app.php make sure you have:

'debug' => false,

because you don't want to display errors when on production and you could forget about changing it when moving on production.

Now in app/config/local/app.php make sure you have:

'debug' => true,

Now in local environment you will have displayed errors in details and when moving to production standard messages as you have no (of course unless you won't create custom error page for that).

Upvotes: 1

user4097807
user4097807

Reputation:

Go to project/app/config/app.php and set debug = true

To have it be set to true in dev. and false on production look into setting up environment variables.

Upvotes: 3

Related Questions