class Filesystem implements ExtenderInterface

Methods

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

<p>Declare a new filesystem disk.</p>

driver(string $name, string $driverClass)

<p>Register a new filesystem driver.</p>

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

No description

Details

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

<p>Declare a new filesystem disk.</p>

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

Parameters

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

Return Value

Filesystem

See also

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

Filesystem driver(string $name, string $driverClass)

<p>Register a new filesystem driver.</p>

Parameters

string $name
string $driverClass

Return Value

Filesystem

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

Parameters

Container $container
Extension $extension