⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
qda-digital.online
/
app
/
Notifications
/
View File Name :
WelcomeNotification.php
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use NotificationChannels\Twilio\TwilioChannel; use NotificationChannels\Twilio\TwilioSmsMessage; use Illuminate\Notifications\Messages\MailMessage; class WelcomeNotification extends Notification { use Queueable; protected $via_data, $user; /** * Create a new notification instance. * * @return void */ public function __construct($user, $via_data) { $this->via_data = $via_data; $this->user = $user; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { if ($this->via_data['isSendEmail'] && $this->via_data['isSendSMS']) { return ['mail', TwilioChannel::class]; } elseif ($this->via_data['isSendEmail'] && ($this->via_data['isSendSMS'] == false)) { return ['mail']; } elseif ($this->via_data['isSendSMS'] && ($this->via_data['isSendEmail'] == false)) { return [TwilioChannel::class]; } else { return []; } } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage)->view( 'emails.welcome', ['user' => $this->user] ); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } public function toTwilio($notifiable) { return (new TwilioSmsMessage()) ->content('Welcome ' . $notifiable->name . ', Your account has been created!'); } }