|
@@ -220,6 +220,18 @@ class URL {
|
|
|
*/
|
|
|
public static function to_asset($url, $https = null)
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
+ if (static::valid($url)) return $url;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if ($root = Config::get('application.asset_url', false )) {
|
|
|
+
|
|
|
+ return rtrim($root, '/').'/'.ltrim($url, '/');
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (is_null($https)) $https = Request::secure();
|
|
|
|
|
|
$url = static::to($url, $https);
|