protected function callHooks($name)
    {
        $hooks = Arr::get($this->hooks, $name, []);

        foreach ($hooks as $func) {
            if (!$func instanceof Closure) {
                continue;
            }

            $response = call_user_func($func, $this);

            if ($response instanceof Response) {
                return $response;
            }
        }
    }
protected function callHooks($name)
    {
        $hooks = Arr::get($this->hooks, $name, []);

        foreach ($hooks as $func) {
            if (!$func instanceof Closure) {
                continue;
            }

            $response = call_user_func($func, $this);

            if ($response instanceof Response) {
                return $response;
            }
        }
    }
protected function callHooks ( $ name ) { $ hooks = Arr :: get ( $ this -> hooks , $ name , [ ] ) ; foreach ( $ hooks as $ func ) { if ( ! $ func instanceof Closure ) { continue ; } $ response = call_user_func ( $ func , $ this ) ; if ( $ response instanceof Response ) { return $ response ; } } }
Call hooks by giving name.

@param string $name

@return Response
Call hooks by giving name .