@foreach($channels as $ch)
@php
$icon = match($ch) {
'email' => 'bi-envelope-fill text-info',
'sms' => 'bi-chat-dots-fill text-success',
'push' => 'bi-phone-fill text-warning',
'database',
'in_app' => 'bi-bell-fill text-primary',
default => 'bi-circle text-secondary',
};
$desc = match($ch) {
'email' => __('admin.notifications.channel_descriptions.email'),
'sms' => __('admin.notifications.channel_descriptions.sms'),
'push' => __('admin.notifications.channel_descriptions.push'),
'database' => __('admin.notifications.channel_descriptions.database'),
'in_app' => __('admin.notifications.channel_descriptions.in_app'),
default => '',
};
$checked = is_array(old('channels'))
? in_array($ch, old('channels'))
: in_array($ch, ['database', 'email']);
@endphp
@endforeach
@error('channels')
{{ $message }}
@enderror