line('The introduction to the notification.') ->action('Notification Action', url('/')) ->line('Thank you for using our application!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * * @return array */ public function toArray(mixed $notifiable): array { return [ // ]; } public function toWeCom(WorkOrderModel $workOrder): false|array { $workOrder->load(['module', 'user']); $module = $workOrder->module; if ($workOrder->notify === 0) { return false; } // 取消隐藏字段 $module->makeVisible(['wecom_key']); if ($module->wecom_key == null) { $wecom_key = config('settings.wecom.robot_hook.default'); } else { $wecom_key = $module->wecom_key; } return [ 'key' => $wecom_key, 'view' => 'notifications.work_order', 'data' => $workOrder ]; } }