Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Contracts\Cache\Factory;
- use Illuminate\Cache\RateLimiter;
- $this->app->singleton(RateLimiter::class, function (): RateLimiter {
- /** @var Factory $cacheFactory */
- $cacheFactory = $this->app->get(Factory::class);
- return new RateLimiter($cacheFactory->store('db'))
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement