user = UserModel::find($this->media->uid); $log = LogModel::whereRaw($this->media->field_primary)->first(); if ($log) { switch ($this->media->result) { case MediaSecure::MANUAL_SUGGESTION_BLOCK: $this->handleFailed($log); break; case MediaSecure::MANUAL_SUGGESTION_PASS: $this->handleSuccess($log); break; } } } public function handleFailed($log) { $log->recall(); $this->notification(); } /** * 通知 */ public function notification() { $payload = [ 'to_user' => $this->user->getAuth(), 'user' => $this->user->toArray(), 'meta' => [ 'field' => '心动接唱', 'handle' => '已被删除', ], ]; dispatch(new RegistEventJob(100016, $payload))->onQueue("{push}"); } public function handleSuccess($log) { } }