classes/Controllers/Base.php
protected function populateView($content, $vars = [])
    {
        // The view
        if (is_string($content)) {
            $this->layout->content = View::make($content);
        } else {
            $this->layout->content = $content;
        }

        // Set vars
        $this->layout->title = $this->title();
        $this->layout->description = $this->description();
        View::share('controller', $this->controller);

        // Make sure that the content is a Laravel view before applying vars.
        // to it.  In the case of the index view, `content` is a Fields\Listing
        // instance, not a Laravel view
        if (is_a($this->layout->content, 'Illuminate\View\View')) {
            $this->layout->content->with($vars);
        }

        // Return the layout View
        return $this->layout;
    }
protected function populateView($content, $vars = [])
    {
        // The view
        if (is_string($content)) {
            $this->layout->content = View::make($content);
        } else {
            $this->layout->content = $content;
        }

        // Set vars
        $this->layout->title = $this->title();
        $this->layout->description = $this->description();
        View::share('controller', $this->controller);

        // Make sure that the content is a Laravel view before applying vars.
        // to it.  In the case of the index view, `content` is a Fields\Listing
        // instance, not a Laravel view
        if (is_a($this->layout->content, 'Illuminate\View\View')) {
            $this->layout->content->with($vars);
        }

        // Return the layout View
        return $this->layout;
    }
protected function populateView ( $ content , $ vars = [ ] ) { // The view if ( is_string ( $ content ) ) { $ this -> layout -> content = View :: make ( $ content ) ; } else { $ this -> layout -> content = $ content ; } // Set vars $ this -> layout -> title = $ this -> title ( ) ; $ this -> layout -> description = $ this -> description ( ) ; View :: share ( 'controller' , $ this -> controller ) ; // Make sure that the content is a Laravel view before applying vars. // to it.  In the case of the index view, `content` is a Fields\Listing // instance, not a Laravel view if ( is_a ( $ this -> layout -> content , 'Illuminate\View\View' ) ) { $ this -> layout -> content -> with ( $ vars ) ; } // Return the layout View return $ this -> layout ; }
Pass controller properties that are used by the layout and views through
to the view layer

@param  mixed                $content string view name or an HtmlObject / View object
@param  array                $vars    Key value pairs passed to the content view
@return Illuminate\View\View
Pass controller properties that are used by the layout and views through to the view layer