composer require awcodes/filament-curator
php artisan curator:install
<x-curator::modals.modal />
@import '../../../../vendor/awcodes/filament-curator/resources/css/plugin.css';
@source '../../../../vendor/awcodes/filament-curator/resources/**/*.blade.php';
Add a CuratorPicker to a Filament form:
use Awcodes\Curator\Components\Forms\CuratorPicker;
CuratorPicker::make('image')
->label('Featured Image')
->required();
Media Management:
CuratorPicker in forms for uploads/selection.CuratorColumn in tables for display:
CuratorColumn::make('image')->size(40);
Relationships:
belongsTo relationship with Curator\Models\Media.belongsToMany with pivot order:
CuratorPicker::make('gallery')
->multiple()
->relationship('gallery', 'id')
->orderColumn('order');
Rich Editor Integration:
RichEditor::make('content')
->plugins([AttachCuratorMediaPlugin::make()]);
CuratorPicker::make('avatar')
->pathGenerator(DatePathGenerator::class);
Curation::presets([
CurationPreset::make('Thumbnail')->width(200)->height(200),
]);
<x-curator-glider> for dynamic image rendering:
<x-curator-glider :media="$media" width="300" height="300" />
Spatie Media Library Conflict:
N+1 Queries in Tables:
CuratorColumn triggers N+1 queries without eager loading.protected function getTableQuery(): Builder {
return parent::getTableQuery()->with('media');
}
Missing Modal:
<x-curator::modals.modal /> in layouts (standalone forms).</body>.Custom Model Overrides:
Curator\Models\Media.config/curator.php:
'model' => \App\Models\CustomMedia::class,
disk and directory in config/curator.php./curator by default) are accessible.register() method.@if($media->hasCuration('thumbnail'))
<x-curator-curation :media="$media" curation="thumbnail" />
@else
<x-curator-glider :media="$media" width="200" height="200" />
@endif
Awcodes\Curator\PathGenerators\PathGenerator for unique storage logic.Glide::registerGliderFallbacks([
GliderFallback::make('placeholder')
->source('placeholder.jpg')
->width(100)
->height(100),
]);
curator.media.created or curator.media.deleted to extend functionality.force="true" in <x-curator-glider> for cloud storage (e.g., S3), but cache aggressively.true for CuratorPicker; disable with lazyLoad(false) if needed.How can I help you explore Laravel packages today?