alenadashko / filament-cloud-file-links
Filament form field for cloud file links (name + URL), KeyValue-compatible array storage
Package info
github.com/Alena009/filament-cloud-file-links
pkg:composer/alenadashko/filament-cloud-file-links
v2.1.5
2026-07-20 17:30 UTC
Requires
- php: ^8.1
- filament/forms: ^3.2 || ^4.0 || ^5.0
README
A Filament form field based on KeyValue. Stores an array of link name => URL for cloud storage file links.
UI
Looks like KeyValue, but with:
- File / Link — clickable name that opens the hidden URL
- Edit — modal with the same form as when adding
- Delete — removes the row
Requirements
- PHP 8.1+
- Filament Forms 3.x, 4.x, or 5.x
Installation
composer require alenadashko/filament-cloud-file-links
The service provider is registered via Laravel package discovery.
Local path development (optional)
{
"repositories": [
{
"type": "path",
"url": "../filament-cloud-file-links",
"options": {
"symlink": true
}
}
],
"require": {
"alenadashko/filament-cloud-file-links": "^2.0"
}
}
composer update alenadashko/filament-cloud-file-links
Usage
use FilamentCloudFileLinks\Forms\Components\CloudFileLinks; CloudFileLinks::make('cloud_files') ->label('Cloud files')
Cast the model attribute to array (same as KeyValue):
protected $casts = [ 'cloud_files' => 'array', ];
Stored value shape:
[
'Contract.pdf' => 'https://storage.example.com/files/abc123',
'Passport scan' => 'https://storage.example.com/files/def456',
]
Customization
CloudFileLinks::make('cloud_files') ->fileLabel('Documents') ->emptyLabel('No documents yet') ->nameFieldLabel('Name') ->urlFieldLabel('URL') ->nameFieldPlaceholder('e.g. Certificate of completion') ->urlFieldPlaceholder('https://...') ->addActionLabel('Add document') ->editActionLabel('Edit document') ->addable() ->deletable() ->deleteRequiresConfirmation() ->deleteConfirmationModalHeading('Delete document') ->deleteConfirmationModalDescription('This cannot be undone.') ->deleteConfirmationModalSubmitActionLabel('Yes, delete') ->deleteConfirmationModalCancelActionLabel('Cancel') ->editableKeys() // together with editableValues controls the Edit button ->editableValues();
License
MIT