コード例 #1
0
ファイル: ForumBoard.php プロジェクト: Codex-NG/cornexaac
 /**
  * Retrive all threads that belongs board
  *
  * @return App\Classes\ForumPost
  */
 public function threads()
 {
     $rows = app('forumpost')->where(function ($query) {
         $query->where('is_reply', 0);
         $query->where('board_id', $this->id);
     })->orderBy('created', 'desc')->paginate(config('forum', 'threads.per_page'))->appends(['subtopic' => 'forum', 'board' => $this->id]);
     $presenter = app('ThemeLoader')->config('presenter.forum-replies');
     static::$pagination = with(new $presenter($rows));
     return $rows;
 }
コード例 #2
0
 /**
  * Set pagination object
  *
  * @return void
  */
 public function setPagination($items)
 {
     $presenter = app('ThemeLoader')->config('presenter.highscores');
     static::$pagination = with(new $presenter($items));
 }