protected function addClassEvent($view, $class, $prefix)
    {
        $name = $prefix.$view;

        // When registering a class based view "composer", we will simply resolve the
        // classes from the application IoC container then call the compose method
        // on the instance. This allows for convenient, testable view composers.
        $callback = $this->buildClassEventCallback(
            $class, $prefix
        );

        $this->addEventListener($name, $callback);

        return $callback;
    }
protected function addClassEvent($view, $class, $prefix)
    {
        $name = $prefix.$view;

        // When registering a class based view "composer", we will simply resolve the
        // classes from the application IoC container then call the compose method
        // on the instance. This allows for convenient, testable view composers.
        $callback = $this->buildClassEventCallback(
            $class, $prefix
        );

        $this->addEventListener($name, $callback);

        return $callback;
    }
protected function addClassEvent ( $ view , $ class , $ prefix ) { $ name = $ prefix . $ view ; // When registering a class based view "composer", we will simply resolve the // classes from the application IoC container then call the compose method // on the instance. This allows for convenient, testable view composers. $ callback = $ this -> buildClassEventCallback ( $ class , $ prefix ) ; $ this -> addEventListener ( $ name , $ callback ) ; return $ callback ; }
Register a class based view composer.

@param  string    $view
@param  string    $class
@param  string    $prefix
@return \Closure
Register a class based view composer .