Updated URL class to use application.index.

This commit is contained in:
Taylor Otwell 2011-06-16 07:23:53 -07:00
parent 5659532d6e
commit 825be5be77
1 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,10 @@ public static function to($url = '', $https = false)
return $url;
}
$base = Config::get('application.url');
// ----------------------------------------------------
// Get the base URL and index page.
// ----------------------------------------------------
$base = Config::get('application.url').'/'.Config::get('application.index').'/';
// ----------------------------------------------------
// Does the URL need an HTTPS protocol?
@ -28,7 +31,7 @@ public static function to($url = '', $https = false)
$base = 'https://'.substr($base, 7);
}
return rtrim($base, '/').'/'.ltrim($url, '/');
return $base.ltrim($url, '/');
}
/**