Define BASE_URL globally (constant)

/app/Providers/AppServiceProvider.php

use Illuminate\Support\Facades\App;

    public function boot()
    {
        $env = env('APP_ENV');
        if($env == 'local' || $env == 'testing'){
            define('USE_HTTPS', false);
        }else{
            define('USE_HTTPS', true);
        }

        if(USE_HTTPS == true){
            \URL::forceScheme('https');
            $base_url = secure_url('/');
        }else{
            $base_url = url('/');
        }

        define('BASE_URL', $base_url . '/');
        define('ASSETS_FRONT', $base_url . '/assets/front/');
        define('ASSETS_ADMIN', $base_url . '/assets/admin/');
    }