Bind data to the view.

@param  View $view
192838
public function compose(View $view)
    {

        // Grab the menu and sort it.
        $menu = config('package.sidebar');
        ksort($menu);

        // Return the sidebar with the loaded packages menus
        $view->with('menu', collect($menu)->map(function ($menu_data, $package_name) {

            return $this->load_plugin_menu($package_name, $menu_data);

        })->filter(function ($entry) {

            // Clean out empty entries that may appear as a result of
            // permissions not being granted.
            if (! is_null($entry))
                return $entry;
        }));
    }
37997
protected function set_view()
	{
		$this->_view instanceOf View or $this->_view = \View::forge($this->_view);
	}
1314155
public function compose(View $view)
    {
        if (! $this->site) {
            $this->site = Site::where('slug', Config::get('multisite.site'))->first();
        }

        $view->with('currentSite', $this->site);
    }
961661
public function links($view = "default", $data = [])
    {
        extract($data);

        $paginator = $this;

        $elements = $this->elements();

        require dirname(__FILE__) . "/pagination/" . $view . ".php";
    }
655798
public function compose(View $view)
    {
        /**
         * @var  \Carbon\Carbon                  $start
         * @var  \Carbon\Carbon                  $end
         * @var  \Illuminate\Support\Collection  $range
         */
        extract(DateRange::getCurrentMonthDaysRange());

        $view->with('countriesRatio', $this->calculateCountriesPercentage(
            $this->getCountriesCountFromSessions($start, $end)
        ));
    }
1367522
public function compose(View $view)
    {
        /**
         * @var  \Carbon\Carbon                  $start
         * @var  \Carbon\Carbon                  $end
         * @var  \Illuminate\Support\Collection  $range
         */
        extract(DateRange::getCurrentMonthDaysRange());

        $view->with('authenticatedVisitorsRatio', $this->getAuthenticatedVisitorsRatio(
            $this->getVisitorsFilteredByDateRange($start, $end)
        ));
    }
232503
public function compose(View $view)
    {
        $categoryOptions = Category::getCategoryOptions();
        $storageOptions = []; //Storage::pluck('name', 'id');
        $view->with('categoryOptions', $categoryOptions)
            ->with('storageOptions', $storageOptions);
    }
485207
public function createView(View $view)
    {
        $this->_execSql($this->_platform->getCreateViewSQL($view->getQuotedName($this->_platform), $view->getSql()));
    }
662057
public function prepareTemplateParameters(View $view)
    {
        $data = $view->getData();

        if ($data instanceof FormInterface) {
            $data = [$view->getTemplateVar() => $data->getData(), 'form' => $data];
        } elseif (empty($data) || !is_array($data) || is_numeric((key($data)))) {
            $data = [$view->getTemplateVar() => $data];
        }

        if (isset($data['form']) && $data['form'] instanceof FormInterface) {
            $data['form'] = $data['form']->createView();
        }

        $templateData = $view->getTemplateData();
        if (is_callable($templateData)) {
            $templateData = call_user_func($templateData, $this, $view);
        }

        return array_merge($data, $templateData);
    }
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);
    }
1013510
public static function setView($view)
    {
        if (count(self::$execContexts)) {
            self::$execContexts[count(self::$execContexts) - 1]['view'] = $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');
            });
        });
    }
377622
public function compose(View $view)
    {
        $userGroupRepository = app(UserGroupInterface::class);
        $userGroupOptions = $userGroupRepository->all()->pluck('name', 'id');
        $view->with('userGroupOptions', $userGroupOptions);
    }
891883
protected function render($view)
    {
        $view = $this->getViewPath().$view.'.php';
        if (empty($this->attributes) === true) {
            $this->template->setAttributes(
                $this->attributes = $this->getAttributes()
            );
        }

        return $this->template->render($view);
    }
87335
public function composeWithRequiredFields(View $view)
    {
        $requiredFields = array_keys($this->getRequiredFields());

        $view->with('requiredFields', $requiredFields);
    }
740310
public function setView($view, array $data = [])
    {
        $this->view = $view;

        $this->data = $data;

        return $this;
    }
1150364
public function view($view = null, $layout = null)
    {
        if (! is_null($layout)) {
            $this->layoutOptions = [
                'default' => $layout,
                'ajax'    => $layout,
            ];
        }

        // Set up the default view resolution
        viewBuilder()->setUp($this->layoutOptions, $view);
        $this->setupLayout();
    }