Configuration
Edit config/filament-sanchaya.php after publishing.
php
return [
// Eloquent model for file records
'model' => \DP0\Sanchaya\Models\SanchayaFile::class,
// Eloquent model for polymorphic attachments
'attachment_model' => \DP0\Sanchaya\Models\SanchayaAttachment::class,
// Gate policy for file operations. null = no authorization.
'policy' => \DP0\Sanchaya\Policies\SanchayaFilePolicy::class,
// true = soft deletes (recoverable); false = hard delete
'soft_deletes' => true,
'allowed_disks' => null,
'default_disk' => env('SANCHAYA_DEFAULT_DISK', 'public'),
'file' => [
'max_file_size' => 10240, // KB - 10 MB
'accepted_file_types' => [], // e.g. ['image/*']
],
'storage_quota' => null, // bytes; null = unlimited
'actions' => [
'download' => [
'enabled' => true,
'label' => 'Download',
'icon' => 'heroicon-m-arrow-down-tray',
'class' => \DP0\Sanchaya\Actions\DownloadAction::class,
],
'create_folder' => [
'enabled' => true,
'label' => 'Create Folder',
'icon' => 'heroicon-m-folder-plus',
'class' => \DP0\Sanchaya\Actions\CreateFolderAction::class,
],
'rename' => [
'enabled' => true,
'label' => 'Rename',
'icon' => 'heroicon-m-pencil',
'class' => \DP0\Sanchaya\Actions\RenameAction::class,
],
'move' => [
'enabled' => true,
'label' => 'Move',
'icon' => 'heroicon-m-arrow-right-circle',
'class' => \DP0\Sanchaya\Actions\MoveAction::class,
],
'copy' => [
'enabled' => true,
'label' => 'Copy',
'icon' => 'heroicon-m-document-duplicate',
'class' => \DP0\Sanchaya\Actions\CopyAction::class,
],
'delete' => [
'enabled' => true,
'label' => 'Delete',
'icon' => 'heroicon-m-trash',
'class' => \DP0\Sanchaya\Actions\DeleteAction::class,
],
],
'sanchaya_picker' => [
'multiple' => false,
'allowed_types' => [], // e.g. ['image']
'max_files' => null,
],
];Config Reference
| Key | Default | Description |
|---|---|---|
model | SanchayaFile | Eloquent class for file records. |
attachment_model | SanchayaAttachment | Eloquent class for pivot. |
policy | SanchayaFilePolicy | Gate policy controlling file operations. |
soft_deletes | true | Whether deletes are recoverable. |
allowed_disks | null | List of visible disks; null allows all configured disks. |
default_disk | public | Disk shown when the manager opens. |
file.max_file_size | 10240 | Upload size limit in KB. |
file.accepted_file_types | [] | Accepted upload MIME types; empty allows all types. |
storage_quota | null | Per-disk upload quota in bytes, based on active indexed files; null means unlimited. |
actions.*.enabled | true | Enable or disable a manager action. preview is UI-only; the other actions can use custom classes. |
actions.*.label | Action label | Text shown for the action in buttons, menus, and notifications. |
actions.*.icon | Heroicon name | Icon shown for the action in the file manager. |
actions.*.class | Action class | Override the service class resolved for download, create_folder, rename, move, copy, or delete. |
sanchaya_picker | Single selection | Default multiple, allowed_types, and max_files values for picker fields. |