Changes the delay property to use the Delay attribute
use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Queue\Attributes\Delay;
+#[Delay(10)]
final class ProcessPodcast implements ShouldQueue
{
- public $delay = 10;
}
Configure your rector.php:
<?php
use RectorLaravel\Rector\Class_\DelayPropertyToDelayAttributeRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
DelayPropertyToDelayAttributeRector::class,
]);