github hugomyb/filament-media-action v5.0.0.1

4 hours ago

What's Changed

Bug Fixes

  • Fixed Call to a member function makeGetUtility() on null error when using $get (or $set) as a parameter in the ->media() closure when the action is not attached to a schema component (e.g. header actions, table row actions, page actions).

Behavior

  • Inside a schema context (form, infolist, suffix/prefix action on a field): $get and $set work as expected.
  • Outside a schema context: $get and $set are now safely null instead of throwing — your closure can guard against it (e.g. if ($get) { ... }).

Example

MediaAction::make('media-url')
    ->media(fn ($get, $record) => $get
        ? $get('media_url')
        : $record->url
    )

Full Changelog: v5.0.0.0...v5.0.0.1

Don't miss a new filament-media-action release

NewReleases is sending notifications on new releases.