forked from eatvio/eatvio-infra
04 10 2023 snapshot
This commit is contained in:
68
app/Notifications/ConsultantRequestStarted.php
Normal file
68
app/Notifications/ConsultantRequestStarted.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\ConsultantEducation;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class ConsultantRequestStarted extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private ConsultantEducation $education;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*/
|
||||
public function __construct(ConsultantEducation $education)
|
||||
{
|
||||
$this->afterCommit();
|
||||
$this->education = $education;
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*/
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject('[Eatvio] New Consultant request')
|
||||
->line('User: ' . $notifiable->name . " send Consultant request")
|
||||
->action('Notification Action', route('profile.show', $notifiable))
|
||||
->line('Thank you for using our application!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(object $notifiable): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public function withDelay(object $notifiable): array
|
||||
{
|
||||
return [
|
||||
'mail' => now()->addMinutes(5),
|
||||
'sms' => now()->addMinutes(10),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user