diff --git a/application/config/application.php b/application/config/application.php index 01f07845..8923c543 100755 --- a/application/config/application.php +++ b/application/config/application.php @@ -15,6 +15,20 @@ 'url' => '', + /* + |-------------------------------------------------------------------------- + | Asset URL + |-------------------------------------------------------------------------- + | + | The base URL used for your application's asset files, if you are serving + | them through a different server or a content delivery network, for + | example. If it's not set, we'll default to the application URL (above). + | Leave off the trailing slash. + | + */ + + 'asset_url' => '', + /* |-------------------------------------------------------------------------- | Application Index diff --git a/laravel/bundle.php b/laravel/bundle.php index 15b9b3da..f2949d77 100644 --- a/laravel/bundle.php +++ b/laravel/bundle.php @@ -297,7 +297,9 @@ public static function assets($bundle) { if (is_null($bundle)) return static::assets(DEFAULT_BUNDLE); - return ($bundle != DEFAULT_BUNDLE) ? URL::base()."/bundles/{$bundle}/" : URL::base().'/'; + $server = Config::get('application.asset_url', URL::base() ); + + return ($bundle != DEFAULT_BUNDLE) ? $server."/bundles/{$bundle}/" : $server.'/'; } /**