예제 #1
0
파일: Topic.php 프로젝트: PovilasLT/maze
 public static function frontPage($sort)
 {
     if ($sort == 'populiariausi' || !$sort) {
         $topics = Topic::games()->pinned()->popular()->withReplies()->paginate(20);
     } else {
         $topics = Topic::games()->pinned()->latest()->withReplies()->paginate(20);
     }
     return $topics;
 }