grapper with flaresolverr in docker
This commit is contained in:
1 parent
911b515021
commit
8325f3a334
6 files changed
+47
-11
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user