Save workspace changes

This commit is contained in:
2026-04-18 17:02:56 +02:00
parent f02ea9a711
commit 87d60af5a9
4220 changed files with 1388603 additions and 1554 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Notifications;
use App\Models\Post;
use App\Models\PostComment;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
class PostCommentedNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(
public readonly Post $post,
public readonly PostComment $comment,
public readonly User $commenter,
) {}
public function via(object $notifiable): array
{
return ['database'];
}
public function databaseType(object $notifiable): string
{
return 'post_commented';
}
public function toDatabase(object $notifiable): array
{
return [
'type' => 'post_commented',
'post_id' => $this->post->id,
'comment_id' => $this->comment->id,
'commenter_id' => $this->commenter->id,
'commenter_name' => $this->commenter->name,
'commenter_username' => $this->commenter->username,
'message' => "{$this->commenter->name} commented on your post",
'url' => "/@{$this->post->user->username}/posts",
];
}
}