$site_id, 'key' => $key, 'data' => $data, 'template' => $template]); $notice_data = array_values(array_filter($result))[0] ?? []; if(empty($notice_data)) throw new NoticeException(); event('notice', ['site_id' => $site_id, 'key' => $key, 'to' => $notice_data['to'], 'vars' => $notice_data['vars'], 'template' => $template]); return true; } }