initial commit

This commit is contained in:
2026-06-29 13:00:18 +06:00
commit f2aea74471
3931 changed files with 562423 additions and 0 deletions

51
app/Mail/SendEmail.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\File;
class SendEmail extends Mailable
{
use Queueable, SerializesModels;
private $data, $email_subject,$from_email, $attachment, $template;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data, $email_subject,$from, $attachment, $template)
{
$this->data = $data;
$this->email_subject = $email_subject;
$this->from_email = $from;
$this->attachment = $attachment;
$this->template = $template;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$mail = $this->subject($this->email_subject)
->from($this->from_email)
->markdown($this->template)
->with(['data' => $this->data]);
if(!empty($this->attachment)){
$mail = $mail->attach($this->attachment);
//unlink($this->attachment);
}
return $mail;
//return $this->view($this->template);
}
}