protected function getFromListeners($contentType, $response)
    {

        foreach (['before', 'after'] as $position) {
            foreach ($this->getAfterOrBeforeListeners('handle',
                $position) as $listener) {
                if($result = $listener($contentType, $response, $this)) {
                    return $result;
                }


            }
        }

        return null;
    }
protected function getFromListeners($contentType, $response)
    {

        foreach (['before', 'after'] as $position) {
            foreach ($this->getAfterOrBeforeListeners('handle',
                $position) as $listener) {
                if($result = $listener($contentType, $response, $this)) {
                    return $result;
                }


            }
        }

        return null;
    }
protected function getFromListeners ( $ contentType , $ response ) { foreach ( [ 'before' , 'after' ] as $ position ) { foreach ( $ this -> getAfterOrBeforeListeners ( 'handle' , $ position ) as $ listener ) { if ( $ result = $ listener ( $ contentType , $ response , $ this ) ) { return $ result ; } } } return null ; }
Fires the event and returns the result if there were some

@param string $contentType
@param \Illuminate\Http\Response $response
@return \Illuminate\Http\Response|null
Fires the event and returns the result if there were some