/** * Compile from string. * * @param string $str * @param array $args * @param string $type * @return Theme */ public function string($str, $args = array(), $type = 'blade') { $shared = $this->view->getShared(); $data['errors'] = $shared['errors']; $args = array_merge($data, $args); return $this->of($str, $args, $type); }
/** * Get the data bound to the view instance. * * @return array */ protected function gatherData() { $data = array_merge($this->factory->getShared(), $this->data); foreach ($data as $key => $value) { if ($value instanceof Renderable) { $data[$key] = $value->render(); } } return $data; }
/** * Get all of the shared data for the environment. * * @return array * @static */ public static function getShared() { return \Illuminate\View\Factory::getShared(); }