initial commit

This commit is contained in:
Inshal
2024-10-25 01:02:11 +05:00
commit 6e65bc3a62
1710 changed files with 273609 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
<?php
namespace App\Notifications;
use App\Models\Patient;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class AppointmentReminder extends Notification
{
use Queueable;
protected $patientId;
/**
* Create a new notification instance.
*/
public function __construct($patientId)
{
$this->patientId = $patientId;
}
/**
* 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
{
$patient = Patient::findOrFail($this->patientId);
echo "email sent";
return (new MailMessage)
->subject('Complete Your Registration')
->greeting('Dear ' . $patient->name)
->line('This is a friendly reminder to complete your registration process.')
->action('Complete Registration', url('/registration/' . $this->patientId))
->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 [
//
];
}
}

View File

@@ -0,0 +1,60 @@
<?php
namespace App\Notifications;
use App\Models\Patient;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class RegistrationReminder extends Notification
{
use Queueable;
protected $patientId;
/**
* Create a new notification instance.
*/
public function __construct($patientId)
{
$this->patientId = $patientId;
}
/**
* 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
{
$patient = Patient::findOrFail($this->patientId);
echo "email sent";
return (new MailMessage)
->subject('Complete Your Registration')
->greeting('Dear ' . $patient->name)
->line('This is a friendly reminder to complete your registration process.')
->action('Complete Registration', url('/registration/' . $this->patientId))
->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 [
//
];
}
}