Handle the subscribe user.

@return \Illuminate\View\View
6388
public function postSubscribe()
    {
        $email = Binput::get('email');
        $subscriptions = Binput::get('subscriptions');
        $verified = app(Repository::class)->get('setting.skip_subscriber_verification');

        try {
            $subscription = execute(new SubscribeSubscriberCommand($email, $verified));
        } catch (ValidationException $e) {
            return cachet_redirect('status-page')
                ->withInput(Binput::all())
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))
                ->withErrors($e->getMessageBag());
        }

        if ($subscription->is_verified) {
            return cachet_redirect('status-page')->withSuccess(trans('cachet.subscriber.email.already-subscribed', ['email' => $email]));
        }

        return cachet_redirect('subscribe.manage', $subscription->verify_code)
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
    }
527089
public function indexAction()
    {
        $isSubscribed = false;

        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
        if ($entry) {
            $isSubscribed = true;
        }

        $viewModel = $this->buildView($this->game);
        $viewModel->setVariables(array(
            'isSubscribed' => $isSubscribed,
        ));

        return $viewModel;
    }
1189226
public function handle()
    {
        $this->params = $this->getParams();

        $request = substr($this->request->getRequestUri(), strlen($this->request->getBaseUrl()) + 1);

        if (substr($request, 0, 7) == 'themes/') {
            return $this->serveTheme(substr($request, 6));
        }

        if ($request == '') {
            $request = $this->daux->tree->getIndexPage()->getUri();
        }

        return $this->getPage($request);
    }
844508
public function handler(): Response
    {
        $response = [];
        foreach (Bulletin::all() as $bulletin) {
            $response[] = [
                'id' => $bulletin->getId(),
                'createdAt' => $bulletin->getCreatedAt()->getTimestamp(),
                'title' => $bulletin->getTitle(),
                'abstract' => $bulletin->getAbstract(),
                'isDraft' => $bulletin->isDraft(),
                'statistics' => $bulletin->getStatistics()
            ];
        }
        return response($response);
    }
61190
public function handleOAuthCallback()
    {
        $provider = $this->getProvider();
        /** @var OAuthUserContract $user */
        $user = $provider->user();

        return $this->loginOAuthUser($user);
    }
1365372
public function execute()
    {
        //authenticate
        if ($this->authenticate()) {
            $quote = $this->getRequest()->getParam('quote_id');
            if (!$this->helper->getFeefoLogon() or !$quote) {
                return $this->sendNoContentResponse();
            }

            $this->_view->loadLayout();
            $this->_view->renderLayout();
        }
    }
1122560
public function handle()
    {
        $args = [
            '--provider' => LogViewerServiceProvider::class,
        ];

        if ((bool) $this->option('force')) {
            $args['--force'] = true;
        }

        $args['--tag'] = [$this->option('tag')];

        $this->displayLogViewer();
        $this->call('vendor:publish', $args);
    }
366430
def subscribe(self, handler):
        """"""
        assert callable(handler), "Invalid handler %s" % handler
        self.handlers.append(handler)
606202
public function subscribe($events)
    {
        $events->listen(
            Added::class,
            'Laranix\Auth\User\Groups\Events\Subscriber@onAdded'
        );

        $events->listen(
            Updated::class,
            'Laranix\Auth\User\Groups\Events\Subscriber@onUpdated'
        );

        $events->listen(
            Removed::class,
            'Laranix\Auth\User\Groups\Events\Subscriber@onRemoved'
        );
    }
178863
public static function handle()
	{
		$args = func_get_args();
		$key = array_shift( $args );
		
		return call_user_func_array( array( static::$builder, 'build_'.$key ), $args );
	}
22060
public function subscribe()
    {
        if ($this->type == "subscription") {
            throw new Exceptions\ChannelException("Already subscribed to this channel.");
        }

        if (!empty($this->myChannel)) {
            throw new Exceptions\ChannelException("Cannot subscribe to own channel.");
        }

        try {
            return new Channel(
                Connection::sendCurlRequest(Connection::URL_SUBSCRIPTIONS, 'POST', ['channel_tag' => $this->channelTag],
                    true, $this->apiKey), $this->apiKey
            );
        } catch (Exceptions\ConnectionException $e) {
            if ($e->getCode() === 400) {
                throw new Exceptions\NotFoundException("Channel does not exist.");
            } else {
                throw $e;
            }
        }
    }
1228717
public function subscriptions()
    {
        if (!isset($this->subscriptions)) {
            $this->subscriptions = new Services\SubscriptionsService($this->api_client);
        }

        return $this->subscriptions;
    }
706431
protected function subscribeAtPubnub()
    {

        if (!$this->alive()) {
            throw new Exception('Subscription is not alive');
        }

        $pnconf = new PNConfiguration();

        $pnconf->setSubscribeKey($this->_subscription['deliveryMode']['subscriberKey']);
        $pnconf->setPublishKey('convince-pubnub-its-okay');
        $pnconf->setSubscribeTimeout(self::SUBSCRIBE_TIMEOUT);

        $subscribeCallback = new PubnubCallback($this);

        $this->_pubnub = new PubNub($pnconf);
        $this->_pubnub->addListener($subscribeCallback);

        if (!$this->_skipSubscribe) {
            $this->_pubnub->subscribe()
                          ->channels($this->_subscription['deliveryMode']['address'])
                          ->execute();
        }

        return $this;

    }
898612
public function actionSubscriptions()
    {
        $postData = Yii::$app->request->post();
        if ($postData) {
            if (Subscription::remove(!empty($postData['selection']) ? $postData['selection'] : [])) {
                $this->success(Yii::t('podium/flash', 'Subscription list has been updated.'));
            } else {
                $this->error(Yii::t('podium/flash', 'Sorry! There was an error while unsubscribing the thread list.'));
            }
            return $this->refresh();
        }
        return $this->render('subscriptions', [
            'dataProvider' => (new Subscription())->search(Yii::$app->request->get())
        ]);
    }
498499
public function getSubscribe(Request $request)
    {
        $user = $request->user();
        $invoice = $user->meta->upcomingInvoice();

        if ($user->meta->subscribed(config('plans.subscription_name')) && ! is_null($invoice)) {
            return view('billing.details')
                ->with('invoice', $invoice)
                ->with('invoiceDate', Carbon::createFromTimestamp($invoice->date))
                ->with('user', $user);
        }

        return view('billing.subscribe')
            ->with('user', $user);
    }
786117
public function dispatch()
    {
        foreach ($this->getSubscribers() as $channelIdentifier => $subscribers) {
            // Get channel from ChannelFactory
            $channel = $this->getChannelFactory()->getChannel($channelIdentifier);

            // Get proper message for the given channel
            $message = $this->getMessage($channel);

            // Decorate message
            $message = $this->decorate($message, $channel);

            // Dispatch to all subscribers
            /** @var SubscriberInterface $subscriber */
            foreach ($subscribers as $subscriber) {
                // Decorate the message
                $message->decorate();

                // Dispatch to the subscriber
                $channel->dispatch($subscriber, $message);
            }
        }
    }
630307
public function update(NewsletterSubscriber $subscriber)
	{
		$attributes = request()->validate(NewsletterSubscriber::$rules, NewsletterSubscriber::$messages);

        $subscriber = $this->updateEntry($subscriber, $attributes);

        return redirect_to_resource();
	}