protected function indexEvent($controllerMethod) { $count = 1; $apiMethod = str_replace('index', 'get', $controllerMethod, $count); $events = new Events(); $title = $events->getReportTitleTranslation($apiMethod); if (method_exists($this, $apiMethod)) { $content = $this->{$apiMethod}(); } else { $content = $this->renderReport($apiMethod); } return View::singleReport($title, $content); }
protected function indexEvent($controllerMethod) { $count = 1; $apiMethod = str_replace('index', 'get', $controllerMethod, $count); $events = new Events(); $title = $events->getReportTitleTranslation($apiMethod); return View::singleReport($title, $this->{$apiMethod}()); }