One Hat Cyber Team
Your IP :
216.73.216.55
Server IP :
5.189.175.239
Server :
Linux panel.gemx-ai.com 5.14.0-570.19.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 4 04:00:24 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
farmersapp
/
store.farmersapp.store
/
app
/
Mail
/
View File Name :
CommonEmailTemplate.php
<?php namespace App\Mail; use App\Models\Utility; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use Illuminate\Contracts\Queue\ShouldQueue; class CommonEmailTemplate extends Mailable { use Queueable, SerializesModels; public $template; public $store; /** * Create a new message instance. * * @return void */ public function __construct($template, $store) { $this->template = $template; $this->store = $store; } /** * Build the message. * * @return $this */ public function build() { $user = \Auth::user(); $settings = Utility::settingsById(1); if($user == null || $user->type == "super admin"){ $from = isset($settings['mail_from_address']) ? $settings['mail_from_address'] : $this->template->from; return $this->from(isset($settings['mail_from_address']) ? $settings['mail_from_address'] : '', $from)->markdown('emails.common_email_template')->subject($this->template->subject)->with( [ 'content' => $this->template->content, 'mail_header' => env('APP_NAME'), ] ); }else{ $from = !empty($this->store['mail_from_address']) ? $this->store['mail_from_address'] : $this->template->from; return $this->from($this->store['mail_from_address'], $from)->markdown('emails.common_email_template')->subject($this->template->subject)->with( [ 'content' => $this->template->content, 'mail_header' => $this->store['name'], ] ); } } }