Search and Load the view or fallbacks to specific view

@param  string $name The name of the view
@param  array  $data View data
@return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
164684
public function getView($name, $data = [])
    {
        $view = 'missing-page';

        if (view()->exists('page::' . $name)) {
            $view = $name;
        }

        return view('page::' . $view, $data);
    }
1329130
public function render($name, array $data = [])
    {
        if (!isset($this->response)) {
            throw new \LogicException(
                sprintf('Invalid %s object instance', ResponseInterface::class)
            );
        }

        return $this->response->write($this->plates->render($name, $data));
    }
391499
public function getView(string $name = '')
    {
        if (empty($name)) {
            $name = $this->getComponentsName();
        }

        $view = $this->MVCFactory($name, 'View');

        return $view;
    }
676556
protected function findRelativePathView($name)
    {
        $caller = Backtrace::getViewOrigin();
        return $this->findInPaths($name, [dirname($caller)]);
    }
421857
public function resolveFileUrl($data, string $name)
    {
        $value = '';
        if (null !== $data) {
            if (is_array($data) && isset($data[$name])) {
                $value = $data[$name];
            } elseif (is_object($data) && property_exists($data, $name)) {
                $value = $data->{$name};
            }

            return is_string($value) ? $value : '';
        }

        return $value;
    }
885026
public function triggerEvent($name, array $data = [])
    {
        try {
            /** @var EventInterface $event */
            $event = $this->createEventObject($name, $data);
        } catch (\InvalidArgumentException $exception) {
            return $this;
        }

        foreach ($this->options['events'][$name]['listeners'] as $eventListener) {
            if ($event->isPropagationStopped()) {
                $this->loggerInstance->makeLogEvent($name, $eventListener, self::EVENT_STATUS_BREAK);
                break;
            }

            $this->executeListener($eventListener, $event, $name);
        }

        return $this;
    }
1374479
public static function view($url, $view, $data = null)
    {
        $callback = function () use ($view, $data) {
            $view = view($view);

            if (!is_null($data)) {
                foreach ($data as $key => $value) {
                    $view = $view->with($key, $value);
                }
            }

            return $view;
        };

        static::get($url, $callback);
    }
1322657
protected function _resource($data, $name)
    {
        $data = get_resource_type($data);
        $this->_renderNode('Resource', $name, $data);
    }
37932
public function view($viewname, $data = '')
    {
        if (in_array($viewname, $this->viewset) === false) {
            $this->viewset[] = array($viewname, $data);
            $view = new View(Base::getInstance());
            $this->loaderHooks($view,'pre_view',$class='',$method_name='',$data=array());
            return $view;
        }
    }
440104
public function render($name, $data = null)
  {
    $t = $this->template($name, $data);

    return $t->render();
  }
1313418
public function call($name, $data = null, $nest = null)
    {

        //Merge data
        if (!is_null($data)) {
            $this->data = array_merge($this->data, $data);
        }

        if (!$this->exists($name, $nest)) {
            throw new ViewNotFoundException($name);
        } else {
            $data = $this->exists($name, $nest);

            $this->path = $data['path'];
            $this->engine = $data['engine'];
            $this->nest = $nest;
        }

        $nameSegments = dot($name);

        $this->name = $this->setName($nameSegments);

        return $this;
    }
266668
private function renderView($name)
    {
        return $this->layout
            ->with($this->data)
            ->nest('content', $name, $this->data);
    }
734842
public function getView($name)
    {
        if (!isset(self::$_controllers['view.'.$name])) {
            $view = $this->getController($name)->setView($name)->getView();
            self::$_controllers['view.'.$name] = $view;
        }

        return self::$_controllers['view.'.$name];
    }
909478
private function _createObjectFromData($name, $data)
    {
        try {
            $cls = new $name();
            foreach ($data as $key => $value) {
                if ($name !== 'stdClass' && !array_key_exists(strtolower($key), get_object_vars($cls))) {
                    var_dump(get_object_vars($cls));
                    continue;
                }
                $key = strtolower($key);
                $cls->$key = $value;
            }
            return $cls;
        } catch (\Exception $e) {
            return null;
        }
    }
1026456
public function getViewDefinition($name = 'default')
    {
        if (array_key_exists($name, $this->views)) {
            return $this->views[$name];
        }

        throw new CMDLParserException('Data type' . rtrim(' ' . $this->getName()) . ' has no view "' . $name . '"',
            CMDLParserException::CMDL_VIEW_NOT_DEFINED);
    }
293938
protected function form($name, array $options = [], array $data = [])
    {
        return \App::make('laravel-form-builder')->create($name, $options, $data);
    }
352672
public static function buildFeature($name, array $data = array())
    {
        $values = [];

        $value = null;
        if (isset($data['values'])) {
            foreach ($data['values'] as $value) {

                $filter = $isFeature = null;
                if (isset($value['filters']) && !empty($value['filters'])) {
                    $filter = self::buildFilterBag($value['filters']);
                }
                if (isset($value['is_feature'])) {
                    $isFeature = (bool) $value['is_feature'];
                }

                $values[] = new Value($value['value'], $filter, $isFeature);
            }
            $value = new ValueBag($values);
        }

        $filter = null;
        if (isset($data['filters']) && !empty($data['filters'])) {
            $filter = self::buildFilterBag($data['filters']);
        }

        $breaker = null;
        if (isset($data['breaker']) && !empty($data['breaker'])) {
            $breaker = self::buildFilterBag($data['breaker']);
        }

        $feature = new Feature($name, $filter, $breaker, $value);

        if (isset($data['enabled']) && !$data['enabled']) {
            $feature->setEnabled(false);
        }

        return $feature;
    }