ToggleColumn::make( 'confirmed' ) ->label( 'Confirmed' ) ->updateStateUsing( function ($record, $state): bool { $user = auth()->user(); if ($user->hasRole( 'admin' )) { return $state; // Confirm toggle on success } else { Notification::make() ->title( 'Action Blocked' ) ->body( 'You do not have permission to change this status.' ) ->color( 'danger' ) ->warning() ->send(); throw ValidationException::withMessages( [] ); } } ),