public function getVeiwCountHumansAttribute() { return $this->view_count . ' ' . \Lang::choice('count.views', ru_count($this->view_count)); }
public function getSubscribersCountHumansAttribute() { $count = (int) ($this->relationLoaded('subscribersCount') ? $this->subscribersCount : $this->subscribers->count()); return $count . ' ' . \Lang::choice('count.subscribers', ru_count($count)); }
public function getAnswersCountHumanAttribute() { // $count = (int) ($this->relationLoaded('answersCount') ? $this->answersCount : $this->answers->count()); $count = isset($this->answersCount) ? (int) $this->answersCount : 0; return $count . ' ' . \Lang::choice('count.answers', ru_count($count)); }
function count_subscribers($number) { return \Lang::choice('count.subscribers', ru_count($number)); }