Skip to content

Instantly share code, notes, and snippets.

@paulredmond
Created February 20, 2016 15:51
Show Gist options
  • Save paulredmond/b228d1d53df6af2bb008 to your computer and use it in GitHub Desktop.
Save paulredmond/b228d1d53df6af2bb008 to your computer and use it in GitHub Desktop.
Development Route for Debugging PHP Info in Lumen
<?php
if (
env('APP_DEBUG') === true
&& !preg_match('/(prd|production|prod)/', env('APP_ENV'))
) {
$app->get('_/phpinfo', function () {
ob_start();
phpinfo();
$response = ob_get_contents();
ob_get_clean();
return $response;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment