REDROOM
PHP 8.3.30
Path:
Logout
Edit File
Size: 919 B
Close
/home/getspomw/itechservicellc.com/app/Jobs/SendBlogToSubscribers.php
Text
Base64
<?php namespace App\Jobs; use App\Models\Subscribe; use App\Models\Blog; use Illuminate\Bus\Queueable; use Illuminate\Support\Facades\Mail; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use App\Mail\NewBlogMail; class SendBlogToSubscribers implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; public $blog; public function __construct(Blog $blog) { $this->blog = $blog; } public function handle() { $subscribers = Subscribe::pluck('email')->toArray(); $chunks = array_chunk($subscribers, 20); foreach ($chunks as $chunk) { foreach ($chunk as $email) { Mail::to($email)->queue(new NewBlogMail($this->blog)); } sleep(10); } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 1
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
SendBlogToSubscribers.php
919 B
lrw-r--r--
2025-10-28 20:21:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).