简体   繁体   中英

Change Debug Mode via URL in one and the same environment in Laravel

I am using Larvel 4 and have set up diferent environments. Onw for my local developement and one for the live server. But sometimes something works in my dev env. but not on the live server. So I wish I would be able to enable Debug mode on the live server without having to change the config file.

I imagine something like adding ?dev=true to the URL.

Is there something built-in or would I have to develope it on my own?

Thanks!

One solution is to use the log file to view any errors: app/storage/logs/laravel.log .

There, you can find the same info as you would on the "Whoops" screen--albeit much in a less elegant presentation.

For a long-term solution, I'd encourage setting up a staging environment as George suggested.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM