/** * Performs the event. */ public function fire() { $this->info(trans('slackin.updating_status')); $status = $this->slack->refreshUsersStatus(); $this->infoStatusUser($status); $this->info(trans('slackin.command_done')); }
/** * Performs the event. */ public function fire() { $this->info(trans('slackin.updating_team_info')); $info = $this->slack->refreshTeamInfo(); $this->horizontalTable($info); $this->info(trans('slackin.command_done')); }
/** * @return \Illuminate\View\View */ public function getIndex() { $data = ['team' => $this->slack->getTeamInfo()]; if (env('SLACK_STATUS_ENABLED', true)) { $data['totals'] = $this->slack->getUsersStatus(); } return view('slack.index', $data); }
/** * Generate a badge poser * @param string $format * @return \Illuminate\Http\Response */ public function generate($format = 'flat') { $totals = $this->slack->getUsersStatus(); $team = $this->slack->getTeamInfo(); $subject = $team['name']; $status = $totals['active'] . '/' . $totals['total']; $color = config('slack-badge.color', 'F1504'); $format = config('slack-badge.format', $format); if (!$this->isValidFormat($format)) { $format = array_get($this->getAllowedBadgesFormat(), 0, 'flat'); } $response = $this->poser->generate($subject, $status, $color, $format); return $response; }