-
This is amazing exactly what we needed - thank you! Only issue finding is that after clicking restore button you need to do a manual refresh to see the changes. FYI using this to display relationship changes really shocked how well it just work. protected function getTableQuery(): Builder
{
$query = parent::getTableQuery();
$page_content_ids = $this->getOwnerRecord()->pageContents()->pluck('id')->toArray();
$query->orWhere(fn($builder) => $builder->where('auditable_type', PageContent::class)->whereIn('auditable_id', $page_content_ids));
return $query;
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@howdu I'm glad you like it! :) In this new release the I was testing the Livewire's protected $listeners = ['auditRestored' => '$refresh']; or in a custom method: protected $listeners = ['auditRestored'];
public function auditRestored()
{
$refresh;
} Using something like this is working: public function auditRestored()
{
$attributes = $this->record->attributesToArray();
$data = $this->mutateFormDataBeforeFill($attributes);
$this->form->fill($data);
} Please let me know if it works for you. Thank you and apologies for the delay! |
Beta Was this translation helpful? Give feedback.
@howdu I'm glad you like it! :)
In this new release the
auditRestored
event has been added (emitted when the audit is restored) so you can listen to it and use it as you see fit.I was testing the Livewire's
$refresh
on the Edit page, but isn't working using directly on listeners:or in a custom method:
Using something like this is working:
Please let me know if it w…