add daily no break grapper

This commit is contained in:
salam committed 2026-09-27 03:42:05 +02:00
1 parent 5188d1f171
commit 17de06cf6b
9 files changed
+325 -177

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Traits\Sofascore;
use App\Mail\SofaScoreDataMail;
use App\Utilities\Notice;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Mail;
trait GrappingMail
{
public function send(string $folder)
{
ini_set('memory_limit', -1);
if ($this->debug) {
Notice::note("Eend excel files from folder $folder", 'b');
}
$files = $this->get_tree("$this->data_dir/$folder");
$sendfiles = $this->filter($files, ['xlsx']);
$header = ucfirst($folder).' '.Carbon::now()->format('Y-m-d');
Mail::to('hermann.telser@gmail.com')
->cc('ubaldo.perrucci@gmail.com')
->send(
new SofaScoreDataMail($header, $sendfiles)
);
if ($this->debug) {
Notice::note('✉ Mail Send', 'bg');
}
}
}