wip
This commit is contained in:
1 parent
1890b1fcc2
commit
bf48caa395
22 files changed
+510
-123
No files matched your search
@@ -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')
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user