예제 #1
0
 public function getSectionInfo()
 {
     $tickets = $this->tickets->getTicketsFromSection($this->request->get('section'));
     $availableCount = count(array_filter($tickets, function ($ticketInfo) {
         return $ticketInfo['status'] == 'available';
     }));
     $view = new Template('modal_section', compact('tickets'));
     return $this->json(['html' => $view->fetch(), 'count' => $availableCount]);
 }
예제 #2
0
 protected function render($template, $data = [])
 {
     $view = new Template($template, $data);
     return new Response($view->fetch());
 }