Compose with model.

@param View $view The view object.

@return void
160870
public function composeWithModel(View $view)
    {
        $key = $this->getModelRouteKey();
        $model = $this->findModelByRouteKey($key);

        $view->with('model', $model);
    }
215297
public function onAdd(ViewInterface $view)
    {
        $this->assertView($view);

        $view->getTwig()->addExtension($this->createExtension());
    }
90918
public function compose(View $view)
    {

        $view->with('user', Auth::user());
        $view->with('user_characters', $this->getUserGroupCharacters(auth()->user()->group));
    }
970776
protected function setPath($view)
    {
        $this->viewModel = new ViewModel([], $this->layout->getName());

        if ($view == null) {
            $view = $this->findView();
        }

        $this->viewModel->view = $view;

        viewResolver()->collectDetails($this->viewModel);

        $this->path = $view;
    }
190346
public function compose(View $view)
    {
        $menu = \Menu::getMenu('adminMenu');

        $menu->link('admin.dashboard', function (Link $link) {
            $link->name = 'Admin Dashboard';
            $link->url  = route('admin.index');
        });
        $menu->link('admin.artisan', function (Link $link) {
            $link->name = 'Artisan';
            $link->url  = route('admin.artisan.index');
        });
        $menu->dropDown('admin.users', 'Users', function (DropDown $dropDown) {
            $dropDown->link('admin.users.index', function (Link $link) {
                $link->name = 'List Users';
                $link->url  = route('admin.users.index');
            });
            $dropDown->link('admin.users.create', function (Link $link) {
                $link->name = 'Add User';
                $link->url  = route('admin.users.create');
            });
        });
    }
1262466
public function composeIndex(View $view)
    {
        $this->composeWithTitle($view);
        $this->composeWithLayout($view);
        $this->composeWithAllRouteNames($view);
        $this->composeWithRequiredFields($view);
        $this->composeWithValidationRules($view);
        $this->composeWithPartialsLocation($view);
        $this->composeWithResourceLocation($view);
    }
89837
public function compose(View $view)
    {
        $view->with([
            'localized'        => $this->repository->isLocalized(),
            'currentLocale'    => app()->getLocale(),
            'availableLocales' => $this->repository->getAvailable(),
        ]);
    }
165290
public function compose(View $view)
    {
        $corporation_info = CorporationInfo::find($this->request->corporation_id);

        if (! is_null($corporation_info))
            $view->with('corporation_name', $corporation_info->name);
    }
279974
protected function compile(string $view): void
	{
		(new Compiler($this->fileSystem, $this->cachePath, $view))->compile();
	}
1172417
public static function render($view, $data = array()){

        if( is_array($view) ){

            foreach( $view as $item ){
                self::render($item, $data);
            }

            return;
        }

        echo self::get($view, $data);
    }
518594
public function compose(View $view)
    {
        $categoryOptions = $this->repository->options();
        $view->with('categoryOptions', $categoryOptions);
    }
316849
public function composeShow(View $view)
    {
        $this->composeWithTitle($view);
        $this->composeWithLayout($view);
        $this->composeWithAllRouteNames($view);
        $this->composeWithPartialsLocation($view);
        $this->composeWithResourceLocation($view);
    }
821565
final public function setView(View $view) {
        $this->view = $view;
        if (!$this->initializedView) {
            $this->initializedView = true;
            $this->init();
        }
        return $this;
    }
847978
public function add(View $view)
    {
        // Append to the stack.
        $this->stack->append($view);

        if ($view->getType() === View::PART_BODY_PLACEHOLDER) {
            $this->bodyKey = (count($this->stack) - 1);
        }

        return count($this->stack);
    }
336918
public function outputView(array $data, $view = null)
    {
        $this->getContext()->getOutput()->outputView($data, $view);
    }
497496
public function compose(View $view)
    {
        $menuItems = new Collection;

        foreach (config("sharp.menu", []) as $menuItemConfig) {
            if($menuItem = MenuItem::parse($menuItemConfig)) {
                $menuItems->push($menuItem);
            }
        }

        $view->with('sharpMenu', (object)[
            "name" => config("sharp.name", "Sharp"),
            "user" => sharp_user()->{config("sharp.auth.display_attribute", "name")},
            "menuItems" => $menuItems,
            "currentEntity" => isset($view->entityKey)
                ? explode(':', $view->entityKey)[0]
                : ($view->dashboardKey ?? null)
        ]);

        $view->with('hasGlobalFilters', sizeof(config('sharp.global_filters') ?? []) > 0);
    }
249886
public function render( $view, $view_suffix = '' ) {
		$this->view        = $view;
		$this->view_suffix = $view_suffix;

		if ( is_singular() ) {
			$this->_render_loop();
		} else {
			$this->_render_direct();
		}
	}