class Filesystem implements ExtenderInterface

Methods

disk(string $name, string|callable $callback)

Declare a new filesystem disk.

driver(string $name, string $driverClass)

Register a new filesystem driver.

extend(Container $container, Extension $extension = null)

No description

Details

Filesystem disk(string $name, string|callable $callback)

Declare a new filesystem disk.

Disks represent storage locations, and are backed by storage drivers. Flarum core uses disks for storing assets and avatars. By default, the "local" driver will be used for disks. The "local" driver represents the filesystem where your Flarum installation is running. To declare a new disk, you must provide default configuration a "local" driver.

Parameters

string $name
string|callable $callback The callback can be a closure or an invokable class, and should accept: - \Flarum\Foundation\Paths $paths - \Flarum\Http\UrlGenerator $url The callable should return: - A Laravel disk config array, The `driver` key is not necessary for this array, and will be ignored.

Return Value

Filesystem

See also

https://laravel.com/docs/8.x/filesystem#configuration

Filesystem driver(string $name, string $driverClass)

Register a new filesystem driver.

Parameters

string $name
string $driverClass

Return Value

Filesystem

extend(Container $container, Extension $extension = null)

Parameters

Container $container
Extension $extension