SuperUserDo
Database Notification Mark As Read
Hi fellas, i have this database notification Mark as read is working, but how do i hide that button after that notification is read?
<?php
namespace App\Notifications;
use App\Models\User;
use Filament\Notifications\Actions\Action;
use Filament\Notifications\Notification as FilamentNotification;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class DatabaseNotification extends Notification
{
use Queueable;
public function __construct(
protected string $view,
protected string $title,
protected array $data = [],
) {}
public function via(object $notifiable): array
{
return ['database'];
}
public function toDatabase(User $notifiable): array
{
return FilamentNotification::make()
->title($this->title)
->body(view($this->view, ['data' => $this->data]))
->actions([
Action::make('Mark as read')
->button()
->markAsRead()
,
])
->getDatabaseMessage();
}
}
2 replies
Table Reordering Wont Trigger Model boot() method to clear cache
Hi, I have an issue when i am reordering table rows, it reorders it but it wont hit that Model's boot() method to clear cache.
In my boot method I have tried, updating, updated, saved... Any way around it?
2 replies
Implementation Of Tables within Expandable Row
Hi fellas, I Have a bit of challange to create expandable row with tabs within. And each tab should have own table (Preferablly livewire with implementation of Filament tables), is there any way to do it?
10 replies