Skip to content

Commit

Permalink
Reformat getBaseUrl method
Browse files Browse the repository at this point in the history
  • Loading branch information
pthiers committed Feb 5, 2020
1 parent 732a05d commit c610b25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Writing/PostmanCollectionWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ protected function getBaseUrl($baseUrl)
$reflectionMethod = new ReflectionMethod(\Laravel\Lumen\Routing\UrlGenerator::class, 'getRootUrl');
$reflectionMethod->setAccessible(true);
$url = app('url');

return $reflectionMethod->invokeArgs($url, ['', $baseUrl]);
} else { //Is Laravel
return URL::formatRoot('', $baseUrl);
}

return URL::formatRoot('', $baseUrl);
}
}

0 comments on commit c610b25

Please sign in to comment.