exists($filename)) { Storage::disk('content')->put($filename, $data); } } /** * Retrieves an accessible URL to a file on the app's configured content delivery system. * The widescreen parameter is used for the placeholder thumbnail on failure. * * @param string $folder * @param string $filename * @param bool $widescreen * @return string */ public static function getUrl(string $filename, bool $widescreen = false): string { if (Storage::disk('content')->exists($filename)) { return asset(sprintf('content/%s', $filename)); } if ($widescreen) { return asset('img/placeholder/widescreen.png'); } return asset('img/placeholder/icon.png'); } }