Compose the view.

@param  \Illuminate\Contracts\View\View  $view
505546
public function compose(View $view)
    {
        /**
         * @var  \Carbon\Carbon                  $start
         * @var  \Carbon\Carbon                  $end
         * @var  \Illuminate\Support\Collection  $range
         */
        extract(DateRange::getCurrentMonthDaysRange());

        $view->with('referersRatio', $this->calculateLanguagesPercentage(
            $this->getReferersCountFromSessionActivities($start, $end)
        ));
    }
316849
public function composeShow(View $view)
    {
        $this->composeWithTitle($view);
        $this->composeWithLayout($view);
        $this->composeWithAllRouteNames($view);
        $this->composeWithPartialsLocation($view);
        $this->composeWithResourceLocation($view);
    }
87335
public function composeWithRequiredFields(View $view)
    {
        $requiredFields = array_keys($this->getRequiredFields());

        $view->with('requiredFields', $requiredFields);
    }
904647
public function setView($view)
    {
        $view   = parent::setView($view);
        $format = $this->getRequest()->getFormat();

        if ($view instanceof KObjectIdentifier && $view->getPackage() != 'activities' && $format  !== 'html')
        {
            $manager = $this->getObject('manager');

            // Set the view identifier as an alias of the component view.
            if (!$manager->getClass($view, false))
            {
                $identifier = $view->toArray();
                $identifier['package'] = 'activities';
                unset($identifier['domain']);

                $manager->registerAlias($identifier, $view);
            }
        }

        return $view;
    }
868598
public function setView($view)
	{
		$this->view = $view;

		// construct the view if needed
		if ( ! $this->view instanceof View)
		{
			$this->view = $this->viewManager->forge($this->view);
		}
	}
223351
public function compose(View $view)
    {
        if (Session::has('multi_language_enabled')) {
            $languages = Session::get('languages');
            $defaultLanguage = Session::get('default_language');
            $langId = request()->get('language_id', $defaultLanguage->id);
            $isDefaultLang = ($defaultLanguage->id == $langId) ? true : false;
        }
        $view->withDefaultLanguage($defaultLanguage)
            ->withLanguages($languages)
            ->withIsDefaultLang($isDefaultLang);
    }
326850
public function setView($view)
    {

        if (class_exists($view)) {
            //if we already have a default view
            $values = [];

            //grab all its parameters and store in parameters
            if (isset($this->view) && $this->view instanceof View) {

                $values = $this->view->getDataArray();
                $layout = $this->view->getLayout();

                //Load the newView;
                $this->view = $this->loadView($view, $values);

                if (!empty($layout)) {
                    $this->view->setLayout($layout);
                }
            }

            return $this;

        } else if (is_string($view)) {

            $this->response->addContent($view); //so that $this->view("Hi There");  will output Hi There;

            return $this;

        }

        return false; //no view set;
    }
222630
public function compose(View $view)
    {
        $termConditionPageUrl = '#';

        $user = Auth::user();

        $pageId = Configuration::getConfiguration('general_term_condition_page');

        if (null !== $pageId) {
            $page = Page::find($pageId);
            $termConditionPageUrl = route('page.show', $page->slug);
        }

        $cartProducts = Session::get('cart');
        $view->with('cartProducts', $cartProducts)
            ->with('user', $user)
            ->with('termConditionPageUrl', $termConditionPageUrl);
    }
211935
public function compose(View $view)
    {
        $categories = Category::with('posts')
            ->whereHas('posts', function (Builder $b) {
                // TODO: Try to export this code with model's scope ?
                $b->where('is_draft', false)
                  ->where('published_at', '<=', Carbon::now());
            })
            ->get()
            ->sortByDesc(function(Category $category) {
                return $category->posts->count();
            });

        $view->with('categoriesWidgetItems', $categories);
    }
862649
public function dropAndCreateView(View $view)
    {
        $this->tryMethod('dropView', $view->getQuotedName($this->_platform));
        $this->createView($view);
    }
320908
public function compose(View $view)
    {

        $owner = $this->getUser($this->request->character_id);
        $summary = $owner->character;
        $characters = $owner->group->users;

        $view->with('summary', $summary);
        $view->with('characters', $characters);
    }
1031027
public function compose(View $view)
    {
        $notifications = Auth::user()
            ->unreadNotifications
            ->where('type', DashboardNotification::class);

        $view->with('notifications', $notifications);
    }
1284111
public function compose(View $view)
    {
        $cart   = (null === Session::get('cart')) ? 0 : count(Session::get('cart'));
        $menus  = Menu::all();
        $metaTitle          = Configuration::getConfiguration('general_site_title');
        $metaDescription    = Configuration::getConfiguration('general_site_description');

        $view->with('menus', $menus)
            ->with('cart', $cart)
            ->with('metaTitle', $metaTitle)
            ->with('metaDescription', $metaDescription);
    }
997950
public function composeWithAllRouteNames(View $view)
    {
        $routes = $this->getAllRouteNames();

        foreach ($routes as $action => $routeName) {
            $view->with("{$action}Route", $routeName);
        }
    }
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);
    }
919191
public function includeFunc( View $view)
	{
		if( $this->isFunc() )
		{
			Helper::includeFile( $this->getFuncFilePath(), ["view" => $view], false, true );
		}
		return $this;
	}
1078083
public function viewContentsInitialized(View $view) {
		$this->cacheStore->store($view->getName(), $this->viewCacheControl->getCharacteristics(), 
				$view->toCacheData());
	}