Commit 71d361e0 authored by Colin Viebrock's avatar Colin Viebrock

Configuration option to set different server for asset files.

parent 94948cf6
...@@ -15,6 +15,20 @@ return array( ...@@ -15,6 +15,20 @@ return array(
'url' => '', '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 | Application Index
......
...@@ -297,7 +297,9 @@ class Bundle { ...@@ -297,7 +297,9 @@ class Bundle {
{ {
if (is_null($bundle)) return static::assets(DEFAULT_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.'/';
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment