public function asset($asset)
{
list($name, $url) = explode(':', $asset);
$baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
$url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url);
return str_replace(['http://', 'https://'], '//', $url);
}
/** @test */ public function it_gets_a_specific_module_asset() { $path = $this->repository->asset('recipe:test.js'); $this->assertEquals('//localhost/modules/recipe/test.js', $path); }