Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Contracts\Cache\Factory;
  4. use Illuminate\Cache\RateLimiter;
  5.  
  6. $this->app->singleton(RateLimiter::class, function (): RateLimiter {
  7.    /** @var Factory $cacheFactory */
  8.    $cacheFactory = $this->app->get(Factory::class);
  9.  
  10.    return new RateLimiter($cacheFactory->store('db'))
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement