Пример #1
0
 /**
  * Get data from Standing for render short table in first page
  * @return array|bool|\Illuminate\Database\Eloquent\Collection|static[]
  */
 public function LeagueTable()
 {
     $liverpool = FootballStanding::whereTeamId('9249')->first();
     $getRank = $liverpool->position - 3;
     $rank = $getRank <= 1 ? $getRank === 1 : $getRank;
     $standing = FootballStanding::where('position', '>=', $rank)->select('*')->orderBy('position', 'asc')->take(7)->get();
     return $standing;
 }