exists($path)) { $this->manifest = json_decode($filesystem->get($path), true); } $this->options = $options; $this->urlGenerator = $urlGenerator; } public function __get(string $path) { return Arr::get($this->manifest, $path, ''); } public function url(string $path): string { if (Str::startsWith(config('app.asset.env'), 'dev')) { $root = config('app.asset.url').':8080'; return $this->urlGenerator->assetFrom($root, $path); } else { $path = $this->$path; $cdn = $this->options->get('cdn_address'); return $this->urlGenerator->assetFrom($cdn, "/app/$path"); } } }