feat: L'Ami Fiduciaire V1.0.0 — full codebase with Story 0.1 complete
Initial commit of the L'Ami Fiduciaire SaaS platform built on Laravel 12, Vue 3, Inertia.js 2, and Tailwind CSS 4. Story 0.1 (rename folders to declarations in database) is implemented and code-reviewed: migration, rollback, and 6 Pest tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
56
app/Notifications/FolderMentionNotification.php
Normal file
56
app/Notifications/FolderMentionNotification.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\Folder;
|
||||
use App\Models\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class FolderMentionNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(
|
||||
public Folder $folder,
|
||||
public User $mentionedBy,
|
||||
public string $message,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @return array<string>
|
||||
*/
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return ['database', 'mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toDatabase(object $notifiable): array
|
||||
{
|
||||
return [
|
||||
'folder_id' => $this->folder->id,
|
||||
'folder_title' => $this->folder->title,
|
||||
'mentioned_by_id' => $this->mentionedBy->id,
|
||||
'mentioned_by_name' => $this->mentionedBy->name,
|
||||
'message' => $this->message,
|
||||
'url' => route('folders.show', $this->folder),
|
||||
];
|
||||
}
|
||||
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject('Vous avez été mentionné - '.$this->folder->title)
|
||||
->markdown('emails.folder-mention', [
|
||||
'folderTitle' => $this->folder->title,
|
||||
'mentionedByName' => $this->mentionedBy->name,
|
||||
'message' => $this->message,
|
||||
'url' => route('folders.show', $this->folder),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user