awcodes/filament-oembed
Filament OEmbed adds rich, responsive embed previews to Filament forms and tables by resolving URLs like YouTube, Vimeo, and Twitter into media cards, with configurable providers and a simple field and column API.
composer require awcodes/filament-oembed (v1.1.1 is the current patch line; ^1.1 is a safe constraint — the release notes are an empty changelog, so treat it as a bug-fix bump with no API changes).OEmbed form component:use Awcodes\FilamentOembed\Forms\Components\OEmbed;
OEmbed::make('video_url')
->label('Video')
->required();
AdminPanelProvider::panel() via ->plugins([...]); if not, the component works standalone. Check vendor/awcodes/filament-oembed/README.md and src/ first — the component's public methods are the real API surface and are more reliable than the docs.php artisan filament:assets) if the preview relies on a Blade view with CSS, otherwise the iframe preview can render unstyled.PostResource form with a "Video URL" field, a table column showing the provider/thumbnail, and a front-end Blade partial that renders the stored embed.->live(onBlur: true) plus afterStateUpdated() to trigger resolution only when the URL settles, rather than on every keystroke.->url(), ->rules(['url'])) and ->columnSpanFull() so long URLs don't break the grid layout.HtmlStrings the result — don't store raw iframe HTML in a text column you might later echo unescaped.Action::form() and RelationManager forms, but the Livewire request budget grows: each resolve is an HTTP round trip. Wrap resolution in Cache::remember() keyed on the normalized URL.Http::fake() with recorded provider responses and assert the field resolves and renders; the real endpoints are flaky in CI and rate-limited.{!! $embed->code !!} so the admin preview and the public site share one resolution path.save().null, partial URLs, and unsupported hosts should short-circuit before the HTTP call — otherwise you get noisy exceptions in the log on every form render.->lazy(), and never resolve inside a getStateUsing() callback.{!! !!} on anything a non-admin can write.width/height. Wrap the iframe in an aspect-ratio container in your own CSS; the package won't solve layout for you.php artisan filament:assets after upgrading — patch bumps occasionally touch compiled views.How can I help you explore Laravel packages today?