/** * Render a widget view. * * @param Module $module * @return View */ protected function renderWidget($module) { // Resolve view component. $view = $this->app->make('view'); // Add a module view namespace for this widget. $view->addNamespace('anbu_widget', $module->getPath()); // Extract template name. $template = $module->getWidget(); // Return rendered template view. return $view->make("anbu_widget::{$template}", $module->getData()); }