Notify user

@param \Modulus\Http\Request $request
@return void
495297
public static function notify($request, $provider, $musked)
  {
    $model = Config::get("auth.provider.{$provider}.model");
    $token = Hash::random(35);

    if ($model::where($musked, $request->input('email'))->first() !== null) {
      Password::updateOrCreate([
        'email' => $request->input('email'),
        'token' => $token,
      ]);
    }

    Session::key('_reset', $token);

    return ['email' => $request->input('email'), 'token' => $token];
  }
18593
public function execute($request): void
    {
        RequestNotSupportedException::assertSupports($this, $request);

        /** @var SyliusPaymentInterface $payment */
        $payment = $request->getModel();

        /** @var OrderInterface $order */
        $order = $payment->getOrder();

        $this->gateway->execute($status = new GetStatus($payment));
        if ($status->isNew()) {
            try {
                $this->gateway->execute($convert = new Convert($payment, 'array', $request->getToken()));
                $payment->setDetails($convert->getResult());
            } catch (RequestNotSupportedException $e) {
                $totalAmount = $order->getTotal();
                $payumPayment = new PayumPayment();
                $payumPayment->setNumber($order->getNumber());
                $payumPayment->setTotalAmount($totalAmount);
                $payumPayment->setCurrencyCode($order->getCurrencyCode());
                $payumPayment->setClientEmail($order->getCustomer()->getEmail());
                $payumPayment->setClientId($order->getCustomer()->getId());
                $payumPayment->setDescription($this->paymentDescriptionProvider->getPaymentDescription($payment));
                $payumPayment->setDetails($payment->getDetails());

                $this->gateway->execute($convert = new Convert($payumPayment, 'array', $request->getToken()));
                $payment->setDetails($convert->getResult());
            }
        }

        $details = ArrayObject::ensureArrayObject($payment->getDetails());

        try {
            $request->setModel($details);
            $this->gateway->execute($request);
        } finally {
            $payment->setDetails((array) $details);
        }
    }
786528
public function handleRequest(Request $request) : void
    {
        $this->reset();
        $this->readSessionId($request);

        if ($this->isTimeToCollectGarbage()) {
            $this->collectGarbage();
        }

        $this->inRequest = true;
    }
204695
public function index(Request $request)
    {
        $notifications = $this->service->paginated();
        return view('admin.notifications.index')->with('notifications', $notifications);
    }
1232222
public function update(Request $request)
    {
        $user = $request->user();

        $this->validate($request, [
            'name' => 'required',
            'email' => 'required|email|unique:users,email,'.$user->id,
        ]);

        return tap($user)->update($request->only('name', 'email'));
    }
759226
protected function incrementLoginAttempts(Request $request)
    {
        $rateLimiter = App::make('Nova\Cache\RateLimiter');

        $rateLimiter->hit($this->getThrottleKey($request));
    }
676590
public function index(Request $request)
    {
        $notifications = $this->service->userBasedPaginated(Auth::id());
        return view('notifications.index')->with('notifications', $notifications);
    }
1024726
public function show($id, ShowRequest $request)
    {
        $user = $request->user();
        $item = $user->notifications()->find($id);
        if (empty($item)) {
            return $this->sendError('Notification not found');
        }
        $item->load($request->getWith());

        return $this->sendResponse($item, '');
    }
577422
public function getNotifications(Request $request)
    {
        if (!$request->isXmlHttpRequest()) {
            $this->app->abort(400);
        }

        $ret = [
            'status'  => 'unknown',
            'message' => '',
            'notifications' => false,
            'changed' => []
        ];

        $authenticator = $this->getAuthenticator();
        if ($authenticator->isAuthenticated()) {
            $usr_id = $authenticator->getUser()->getId();
            if ($usr_id != $request->request->get('usr')) { // I logged with another user
                $ret['status'] = 'disconnected';

                return $this->app->json($ret);
            }
        } else {
            $ret['status'] = 'disconnected';

            return $this->app->json($ret);
        }

        try {
            $this->getApplicationBox()->get_connection();
        } catch (\Exception $e) {
            return $this->app->json($ret);
        }

        if (1 > $moduleId = (int) $request->request->get('module')) {
            $ret['message'] = 'Missing or Invalid `module` parameter';

            return $this->app->json($ret);
        }

        $ret['status'] = 'ok';

        $ret['notifications'] = $this->render('prod/notifications.html.twig', [
            'notifications' => $this->getEventsManager()->get_notifications()
        ]);

        $baskets = $this->getBasketRepository()->findUnreadActiveByUser($authenticator->getUser());

        foreach ($baskets as $basket) {
            $ret['changed'][] = $basket->getId();
        }

        if (in_array($this->getSession()->get('phraseanet.message'), ['1', null])) {
            if ($this->app['phraseanet.configuration']['main']['maintenance']) {
                $ret['message'] .= $this->app->trans('The application is going down for maintenance, please logout.');
            }

            if ($this->getConf()->get(['registry', 'maintenance', 'enabled'], false)) {
                $ret['message'] .= strip_tags($this->getConf()->get(['registry', 'maintenance', 'message']));
            }
        }

        return $this->app->json($ret);
    }
226744
public function send(Request $request)
    {
        $afterValidate = $request->get('afterValidate');
        $notifications = (array) $request->get('notifications', []);

        if (! $afterValidate) {
            return $this->form->get()->isValid();
        }

        $this->fire($this->findModel($notifications));

        return new JsonResponse(['message' => trans('antares/notifications::messages.widget_notification_added_to_queue')]);
    }
796344
public function update(Request $request)
    {
        $post = $this->api('post.fetch', $request->route('post'))->get();

        $this->authorize('edit', $post);

        $post = $this->api('post.update', $request->route('post'))->parameters($request->only('content'))->patch();

        Forum::alert('success', 'posts.updated');

        return redirect(Forum::route('thread.show', $post));
    }
1279098
public function sendRequest(Request $request)
    {
        $response = $this->httpClient->send($request);

        $this->checkErrorResponse($response);

        return $response;
    }
1081395
public function setRequest(Request $request)
    {
        $this->request = $request;

        $this->cachedRoot = null;
        $this->cachedScheme = null;
        $this->routeGenerator = null;
    }
248807
public function execute(Request $request = null)
    {
        $request = $request ?: $this->request;

        $this->dispatcher->dispatch($request, $this->response);

    }
137012
public function receive(Request $request)
    {
        $receive = new Receiver($request);
        $webhook = new WebhookHandler($receive->getMessages(), $this->config, $this->debug);
        $webhook->handle();
    }
342029
public function notify($state = null)
	{
		assert($state === null || is_int($state));
		$this->_state = intval($state) ?: $this->_state;

		/** @var \SplObserver $observer */
		foreach ($this->_observers as $observer)
		{
			$observer->update($this);
		}
	}
1144473
public function onLogoutSuccess(Request $request)
    {
        phpCAS::setDebug($this->cas->getDebug());
        phpCAS::setVerbose($this->cas->isVerbose());
        if (!phpCAS::isInitialized()) {
            phpCAS::client(
                $this->cas->getVersion(),
                $this->cas->getHostname(),
                $this->cas->getPort(),
                $this->cas->getUrl()
            );
        }
        phpCAS::setLang($this->cas->getLanguage());

        if ($this->cas->isRedirectingAfterLogout()) {
            $uri = $this->router->generate(
                $this->cas->getRouteLogout(),
                [],
                UrlGeneratorInterface::ABSOLUTE_URL
            );
            phpCAS::logoutWithRedirectService($uri);
        } else {
            //simple logout
            phpCAS::logout();
        }
    }