MINI Sh3ll
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class InviteUser extends Notification
{
use Queueable;
protected $user;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($user)
{
$this->user = $user;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
//$url = url('/register') . '?' . base64_encode(http_build_query(['name'=> $user->first_name, 'email' => $user->email]));
return (new MailMessage)
->from(config('constants.MAIL_FROM_ADDRESS'), config('constants.MAIL_FROM_NAME'))
->subject('Invitation to Solar-Application')
->markdown('mail_templates.invite_user_mail', ['user' => $this->user]);
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}
OHA YOOOO