1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 16:40:05 +01:00

shorten method

This commit is contained in:
Taylor Otwell
2016-05-12 21:26:13 -05:00
parent 62ba72a77a
commit d7c6152f9e
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ function __construct(Configuration $config, CommandLine $cli, Filesystem $files)
* @param string $path
* @return string|null
*/
function hostForDirectory($path)
function host($path)
{
foreach ($this->files->scandir($this->sitesPath()) as $link) {
if ($resolved = realpath($this->sitesPath().'/'.$link) == $path) {

View File

@@ -158,7 +158,7 @@
* Open the current directory in the browser.
*/
$app->command('open', function () {
$url = "http://".Site::hostForDirectory(getcwd()).'.'.Configuration::read()['domain'].'/';
$url = "http://".Site::host(getcwd()).'.'.Configuration::read()['domain'].'/';
passthru("open ".escapeshellarg($url));
});