Laravel:How to hide environment variables from debug pages

Laravel:How to hide environment variables from debug pages
----------------------------------------------

Some time during development process in production environment we get exception.
The debug page will show all environment variables and their contents. In some cases you may want to obscure certain variables. so laravel provide feature to make them Invisible.

You may do this by updating the debug_hide option in your config/app.php configuration file.


  1. return [  
  2.   
  3.     'debug_hide' => [  
  4.         '_ENV' => [  
  5.             'APP_KEY',  
  6.             'DB_PASSWORD',  
  7.             'AWS_ACCESS_KEY_ID',  
  8.             'AWS_SECRET_ACCESS_KEY'  
  9.         ],  
  10.   
  11.         '_SERVER' => [  
  12.             'APP_KEY',  
  13.             'DB_PASSWORD',  
  14.             'AWS_ACCESS_KEY_ID',  
  15.             'AWS_SECRET_ACCESS_KEY'  
  16.         ],  
  17.   
  18.         '_POST' => [  
  19.             'password',  
  20.         ],  
  21.     ],  
  22. ];  
  23.    

Categories: PHP Tags: #Laravel,

Newsletter Subcribe

Receive updates and latest news direct from our team. Simply enter your email.