Skip to content

Instantly share code, notes, and snippets.

@PavelPolyakov
Last active February 6, 2023 04:11
Show Gist options
  • Save PavelPolyakov/9951060 to your computer and use it in GitHub Desktop.
Save PavelPolyakov/9951060 to your computer and use it in GitHub Desktop.
How to still have the debug turned on on production
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => call_user_func(function() {
if (isset($_SERVER['REMOTE_ADDR']) && in_array($_SERVER['REMOTE_ADDR'], array('255.255.255.255' /* put your IP here */))) {
return true;
}
return false;
}),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment