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(); }
public function index() { $events = Event::orderBy('starts_at', 'DESC')->get(); $this->pageView('events::index', compact('events')); }