public function partialComposer($view, $callback, $layout = null)
    {
        if (! is_array($view)) {
            $view = array($view);
        }

        // Partial path with namespace.
        $path = $this->getThemeNamespace('partials');

        // This code support partialWithLayout.
        if (! is_null($layout)) {
            $path = $path.'.'.$layout;
        }

        $view = array_map(function($v) use ($path) {
            return $path.'.'.$v;
        }, $view);

        $this->view->composer($view, $callback);
    }
public function partialComposer($view, $callback, $layout = null)
    {
        if (! is_array($view)) {
            $view = array($view);
        }

        // Partial path with namespace.
        $path = $this->getThemeNamespace('partials');

        // This code support partialWithLayout.
        if (! is_null($layout)) {
            $path = $path.'.'.$layout;
        }

        $view = array_map(function($v) use ($path) {
            return $path.'.'.$v;
        }, $view);

        $this->view->composer($view, $callback);
    }
public function partialComposer ( $ view , $ callback , $ layout = null ) { if ( ! is_array ( $ view ) ) { $ view = array ( $ view ) ; } // Partial path with namespace. $ path = $ this -> getThemeNamespace ( 'partials' ) ; // This code support partialWithLayout. if ( ! is_null ( $ layout ) ) { $ path = $ path . '.' . $ layout ; } $ view = array_map ( function ( $ v ) use ( $ path ) { return $ path . '.' . $ v ; } , $ view ) ; $ this -> view -> composer ( $ view , $ callback ) ; }
Hook a partial before rendering.

@param  mixed   $view
@param  closure $callback
@return void
Hook a partial before rendering .