199ocero / activity-timeline

Add timelines to custom pages or infolist entries effortlessly. Plus, it teams up smoothly with Spatie Activitylog for easy tracking.
https://filamentphp.com/plugins/jaocero-activity-timeline
MIT License
63 stars 16 forks source link

Moved activity query out of private function #19

Closed bilaliqbalr closed 8 months ago

bilaliqbalr commented 8 months ago

Moved activity query out of private function to let users modify query as per their need

199ocero commented 8 months ago

Hey @bilaliqbalr thanks for this suggestion, can you explain what's the use case for this? I know you want to modify the query of the spatie activity model and customize what is the query but could you give me an example why you need it? I make it as a private so that it will not be modified as intended. It will only show the records that needed to show in the timeline component. You can also configure the state via the configuration() method.

https://filamentphp.com/plugins/jaocero-activity-timeline#configuration

bilaliqbalr commented 8 months ago

Hi @199ocero I have a use case that I wanted to use it under User Resource and wanted to show all user activities, regardless of the cause. Also, on some other pages I need to apply filters i.e, causer, event, date.

bilaliqbalr commented 8 months ago

@199ocero

199ocero commented 8 months ago

Done @bilaliqbalr . Thank you for your contribution. With this, you can now customize the query that suites to your needs. Thank youu!