Supervisor start stop all button

This commit is contained in:
salam committed 2026-01-14 18:28:24 +01:00
1 parent 66e064257a
commit 3e06aad008
2 files changed
+36 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Actions;
use App\Models\Supervisor;
use Filament\Notifications\Notification;
class SupervisorStatus
{
public static function set($status = 0)
{
Supervisor::query()->update(['is_active' => $status]);
if ($status) {
Notification::make()
->title('All supervisors started successfully')
->success()
->send();
} else {
Notification::make()
->title('All supervisors stopped successfully')
->success()
->send();
}
}
}