Initial commit

This commit is contained in:
2026-02-06 23:26:56 +07:00
commit d6022b9bca
92 changed files with 41386 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
namespace App\Notifications;
use App\Models\Task;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
final class TaskCreatedNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* Create a new notification instance.
*/
public function __construct(
public Task $task
) {
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(): MailMessage
{
return (new MailMessage)
->subject('Task created')
->line("Task «{$this->task->title}» successfully created");
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
//
];
}
}

View File

@@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
namespace App\Notifications;
use App\Models\Task;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
final class TaskOverdueNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* Create a new notification instance.
*/
public function __construct(
public Task $task
) {
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(): MailMessage
{
return (new MailMessage)
->subject('Task overdue')
->line("Task «{$this->task->title}» overdue");
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
//
];
}
}