avatar->profile_id; } /** * Get the middleware the job should pass through. * * @return array */ public function middleware(): array { return [(new WithoutOverlapping("avatar-storage-cleanup:{$this->avatar->profile_id}"))->shared()->dontRelease()]; } /** * Create a new job instance. */ public function __construct(Avatar $avatar) { $this->avatar = $avatar->withoutRelations(); } /** * Execute the job. */ public function handle(): void { AvatarService::cleanup($this->avatar, true); return; } }