Пример #1
0
 public function render($parameters = array())
 {
     $limit = isset($parameters['limit']) ? (int) $parameters['limit'] : self::LIMIT;
     $events = Event::orderBy('created_at', 'DESC')->take($limit)->get();
     return View::make('events::widget', compact('events'))->render();
 }
Пример #2
0
 public function index()
 {
     $events = Event::orderBy('starts_at', 'DESC')->get();
     $this->pageView('events::index', compact('events'));
 }