Пример #1
0
 /**
  * Page d'accueil
  *
  * @access public
  * @return View home.home
  */
 public function home()
 {
     // Fetch latest articles
     $articles = Article::orderBy('created_at', 'DESC')->paginate(5);
     // Fetch latest torrents
     $torrents = Torrent::orderBy('created_at', 'DESC')->take(5)->get();
     // Fetch latest topics
     $topics = Topic::orderBy('created_at', 'DESC')->take(5)->get();
     // Fetch latest registered users
     $users = User::orderBy('created_at', 'DESC')->take(5)->get();
     return View::make('home.home', array('articles' => $articles, 'torrents' => $torrents, 'topics' => $topics, 'users' => $users));
 }
Пример #2
0
 /**
  * Affiche la liste des torrents
  *
  * @access public
  * @return page.torrents
  */
 public function torrents()
 {
     $torrents = Torrent::orderBy('created_at', 'DESC')->paginate(20);
     return View::make('torrent.torrents', array('torrents' => $torrents));
 }