class
Illuminate
/
Queue
/
Middleware
/
RateLimited
RateLimited
Properties
protected
$limiterName string
The name of the rate limiter.
Default: null
public
$shouldRelease bool
Indicates if the job should be released if the limit is exceeded.
Default: true
Methods
public
__construct ( $limiterName ) : void
Create a new middleware instance.
Parameters
- $limiterName string
public
handle ( $job , $next ) : mixed
Process the job.
Parameters
- $job mixed
- $next callable
protected
handleJob ( $job , $next , array $limits ) : mixed
Handle a rate limited job.
Parameters
- $job mixed
- $next callable
- $limits array
public
dontRelease ( ) : $this
Do not release the job back to the queue if the limit is exceeded.
protected
getTimeUntilNextRetry ( $key ) : int
Get the number of seconds that should elapse before the job is retried.
Parameters
- $key string
public
__sleep ( ) : array
Prepare the object for serialization.
public
__wakeup ( ) : void
Prepare the object after unserialization.