public function listen($slug, $action, array $arguments = [])
    {
        $ajax = $this->container->make(Ajax::class)
            ->setSlug($slug)
            ->setAction($action)
            ->setArguments($arguments)
            ->dispatch();

        return $this->actions->set($ajax->getSlug(), $ajax);
    }
public function listen($slug, $action, array $arguments = [])
    {
        $ajax = $this->container->make(Ajax::class)
            ->setSlug($slug)
            ->setAction($action)
            ->setArguments($arguments)
            ->dispatch();

        return $this->actions->set($ajax->getSlug(), $ajax);
    }
public function listen ( $ slug , $ action , array $ arguments = [ ] ) { $ ajax = $ this -> container -> make ( Ajax :: class ) -> setSlug ( $ slug ) -> setAction ( $ action ) -> setArguments ( $ arguments ) -> dispatch ( ) ; return $ this -> actions -> set ( $ ajax -> getSlug ( ) , $ ajax ) ; }
Listen for action.

@param string $slug
@param string|callable $action
@param array $arguments

@return \Assely\Ajax\Ajax
Listen for action .