app->get('flight.views.path').'/'.$view.'.blade.php')) { $result = true; } return $result; } /** * * @param [type] $page [description] * @param array $data [description] * @return [type] [description] */ protected function render($page, $data = []) { $view = $this->defaultView; // if view isset in page and file exists if (isset($page['data']['view'])) { if ($this->viewExists($page['data']['view'])) { $view = $page['data']['view']; } else { throw new Exception('View '.$page['data']['view'].' not exists'); } } else if (!$this->viewExists($view)) { throw new Exception('View '.$view.' not exists'); } $this->app->render($view, array_merge([ 'page' => $page, 'flight' => $this->app ], $data )); } }