interface DriverInterface

Methods

build(string $diskName, SettingsRepositoryInterface $settings, Config $config, array $localConfig)

Construct a Laravel Cloud filesystem for this filesystem driver.

Details

Cloud build(string $diskName, SettingsRepositoryInterface $settings, Config $config, array $localConfig)

Construct a Laravel Cloud filesystem for this filesystem driver.

Settings and configuration can either be pulled from the Flarum settings repository or the config.php file. Typically, this is done by wrapping a Flysystem adapter in Laravel's `Illuminate\Filesystem\FilesystemAdapter` class. You should ensure that the Flysystem adapter you use has a `getUrl` method. If it doesn't, you should create a subclass implementing that method. Otherwise, this driver won't work for public-facing disks like `flarum-assets` or `flarum-avatars`.

Parameters

string $diskName : The name of a disk this driver is being used for. This is generally used to locate disk-specific settings.
SettingsRepositoryInterface $settings : An instance of the Flarum settings repository.
Config $config : An instance of the wrapper class around `config.php`.
array $localConfig : The configuration array that would have been used if this disk were using the 'local' filesystem driver. Some of these settings might be useful (e.g. visibility, )

Return Value

Cloud