Laravel Debug for Specific IP

(Last Updated On: February 11, 2020)

1

<laravel_dir>/app/config/app.php

2

/*
    |--------------------------------------------------------------------------
    | 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' => env('APP_DEBUG', false),

 

/*
    |--------------------------------------------------------------------------
    | 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' => env('APP_DEBUG', (in_array($_SERVER['REMOTE_ADDR'], ['2001:470:0:76::2', '216.218.186.2'])) ? true : false),

 

3

.env에 APP_DEBUG 제거