mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-12 18:37:12 +00:00
1fbcaf840f
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
381 B
PHP
23 lines
381 B
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
class Throttle
|
|
{
|
|
public const int DEFAULT_PER_SECOND = 60;
|
|
public const int DEFAULT_PER_DAY = 10000;
|
|
}
|
|
|
|
class RateLimiter
|
|
{
|
|
public function perSecond(): int
|
|
{
|
|
return (int) config('throttle.api.per_second', 60);
|
|
}
|
|
|
|
public function perDay(): int
|
|
{
|
|
return (int) config('throttle.api.per_day', 10000);
|
|
}
|
|
}
|