Checkbox::make('send_all_users')
->label('Send to everyone')
->inline()
->reactive(),
Select::make('branch_ids')
->reactive()
->label('Choose branch ids')
->hint('Seçili şube üyelerine gönderin')
->multiple()
->searchable()
->options(fn () =>
Branch::where('corp_id', $authUser->corp_id)
->get()
->pluck('title', 'id')
)
->disabled(function (Closure $get) {
error_log('send_all_users: ' . !boolval($get('send_all_users')));
return !boolval($get('send_all_users'));
}),
Checkbox::make('send_all_users')
->label('Send to everyone')
->inline()
->reactive(),
Select::make('branch_ids')
->reactive()
->label('Choose branch ids')
->hint('Seçili şube üyelerine gönderin')
->multiple()
->searchable()
->options(fn () =>
Branch::where('corp_id', $authUser->corp_id)
->get()
->pluck('title', 'id')
)
->disabled(function (Closure $get) {
error_log('send_all_users: ' . !boolval($get('send_all_users')));
return !boolval($get('send_all_users'));
}),