Я просто использую пример документа, но получаю сообщение об ошибке exception 'Predis\ClientException' with message 'Command 'THROTTLE' is not a registered Redis command.
Я много искал о команде redis, но ничего не о throttle
.
public function handle()
{
// Allow only 2 emails every 1 second
Redis::throttle('my-mailtrap')->allow(2)->every(1)->then(function () {
$recipient = 'steven@example.com';
Mail::to($recipient)->send(new OrderShipped($this->order));
Log::info('Emailed order ' . $this->order->id);
}, function () {
// Could not obtain lock; this job will be re-queued
return $this->release(2);
});
}
Что мне делатьделать? Любая помощь, спасибо!