Configuration option to set different server for asset files.
This commit is contained in:
parent
94948cf675
commit
71d361e071
|
@ -15,6 +15,20 @@
|
||||||
|
|
||||||
'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 @@ public static function assets($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.'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue