Filament Plugins

Purchase

Scoped folder

To scope the Media Library to a specific folder, you can use the ->scopedFolder() method when registering the plugin:

app/Providers/Filament/YourPanelProvider.php

use RalphJSmit\Filament\Explore\Drivers\FilesystemStorageDriver\FileData;
use RalphJSmit\Filament\Explore\Enums\FileType;

$plugin->scopedFolder(FileData::fromDisk('s3', 'path/to/folder', FileType::Folder))

You can also use a closure to dynamically determine the folder based on the tenant:

app/Providers/Filament/YourPanelProvider.php

$plugin->scopedFolder(fn () => FileData::fromDisk('s3', "tenants/" . Filament::getTenant()->getKey(), FileType::Folder))

This way, each of your users will have their own dedicated Media Library.

© FilamentPlugins.com ✦ 2022 – 2025 ✦ All rights reserved.