/** * Report an exception to slack * * @param E $e */ public static function output(E $e, $channel) { Artisan::queue('slack:post', ['to' => $channel, 'attach' => self::exceptionToSlackAttach($e), 'message' => "Thrown exception"]); }
/** * Handle the event. * * @param StudentAssignmentEnded $event * @return void */ public function handle(AssignmentEndedUpdateCreated $event) { $assignment = BookAssignment::find($event->assignmentId); $userId = $assignment->user->id; Artisan::queue('stats:update', ['userId' => $userId]); }
/** * Report an exception to slack * * @param $e */ public function exception(Exception $e) { Artisan::queue('slack:post', ['to' => $this->channel_exception, 'attach' => $this->exceptionToSlackAttach($e), 'message' => "Thrown exception"]); }