rectitude-open/filament-carousels
A Filament package for adding carousels to your admin panel, with components and resources to manage slides, images, and settings. Create responsive carousels and display them in Filament pages and forms.
Install the package and publish its assets:
composer require rectitude-open/filament-carousels
php artisan vendor:publish --tag="filament-carousels-config"
php artisan vendor:publish --tag="filament-carousels-migrations"
php artisan migrate
Register the plugin on each Filament panel you want it in:
use RectitudeOpen\FilamentCarousels\FilamentCarouselsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(FilamentCarouselsPlugin::make());
}
Look here first:
config/filament-carousels.php — media model, upload disk, image conversions, and other knobs.carousels, categories, and picture/media tables and their foreign keys.CarouselResource (and its pages) — this is the admin surface you will customize most often.First use case: create a Carousel in the Filament admin, optionally assign it a Category, add Carousel Items with images, then render the carousel on the front end by fetching the carousel via its model and iterating its ordered items/pictures. Confirm the storage:link exists before uploading images so the admin previews render.
Config-driven media model. Point filament-carousels.media_model (or the equivalent key) at your application's media/image model. As of v1.2.1 the pictures relationship resolves the model from config, so you can swap in a custom model without forking the package.
Panel-scoped registration. Register the plugin only on the panels that should expose carousel management (e.g. an admin panel), keeping editor-facing panels lean.
Resource extension. Subclass or reconfigure the provided CarouselResource/CarouselItemResource to add fields (alt text, links, scheduling, translations) rather than editing vendor files. Use Filament's ->form() / ->table() overrides on the resource or a custom resource that extends the package one.
Front-end rendering. Query the model directly in a controller, view composer, or Blade component:
$carousel = Carousel::where('slug', 'homepage')
->with(['items.pictures'])
->firstOrFail();
Eager-load items and pictures to avoid N+1 queries; the package's relationships are the supported integration point.
Categories as a grouping layer. Use categories for placement (homepage, sidebar, campaign) and keep carousels keyed by slug so templates stay stable while editors rearrange content.
Seeding and fixtures. Seed carousels/items in tests and local setups; because the media model is configurable, seed against the configured model to keep environments consistent.
Blade/component wrapper. Wrap the front-end loop in a small Blade component (<x-carousel :carousel="$carousel" />) so markup and image conversion handling live in one place.
php artisan config:clear) after changing the media model — Filament and Laravel both cache aggressively, and a stale media_model produces confusing "class not found" or relationship errors.id/name collision), retest category filtering after upgrading.php artisan storage:link or a misconfigured disk is the most common "images don't show" cause. Verify the upload disk in config matches the disk you serve from.composer.json and run composer update --with-dependencies deliberately, since plugin releases track Filament internals.composer update rectitude-open/filament-carousels followed by php artisan migrate (if any new migrations appear) and a config cache clear is sufficient. Review the diff if you have customized the category query or media relationship.How can I help you explore Laravel packages today?