panphp / pan

A simple, lightweight, and privacy-focused product analytics php package
MIT License
1.08k stars 48 forks source link

Is there way to integrate with Filement? #4

Open parmonov98 opened 1 month ago

parmonov98 commented 1 month ago

I'd like to get it working with Form components of filament

nunomaduro commented 1 month ago

cc @danharrin

atmonshi commented 1 month ago

yes you can add ->extraAttributes(['data-pan'=>'track name']) to any action you want :)

iamdavidhill commented 1 month ago

@nunomaduro Can you confirm @atmonshi's suggestion works? If so I can update the Readme.

atmonshi commented 1 month ago

you can also configure ALL actions in the panel globally by adding this to any service provider:

Action::configureUsing(function (Action $checkbox): void {
    $checkbox
        ->extraAttributes(fn() => ['data-pan' => $checkbox->getLabel()]);
});
Hamidasl commented 1 month ago

18d36beecc9167871bdea336ed7a7c63675c1628