This commit is contained in:
salam committed 2026-07-25 18:23:26 +02:00
1 parent 1890b1fcc2
commit bf48caa395
22 files changed
+510 -123

No files matched your search

+7 -5
View File
@@ -8,6 +8,7 @@ use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use App\Console\Commands\Grapper\Sofascore;
class SofaScoreDataMail extends Mailable
{
@@ -16,11 +17,12 @@ class SofaScoreDataMail extends Mailable
/**
* Create a new message instance.
*/
public function __construct(string $day, string $message, string $zip_file)
public function __construct(string $header, string $message)
{
$this->day = $day;
$this->header = $header;
$this->message = $message;
$this->zip_file = $zip_file;
$this->archive_name = Sofascore::$archive_name;
$this->zip_file = Sofascore::$storage . Sofascore::$archive_name;
}
/**
@@ -29,7 +31,7 @@ class SofaScoreDataMail extends Mailable
public function envelope(): Envelope
{
return new Envelope(
subject: 'Sofa Score ' . $this->day,
subject: $this->header,
);
}
@@ -55,7 +57,7 @@ class SofaScoreDataMail extends Mailable
{
return [
Attachment::fromPath($this->zip_file)
->as('sofa archive ' . $this->day . '.zip')
->as($this->archive_name)
->withMime('application/x-zip-compressed')
];
}