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,46 @@
<?php
namespace App\Notifications;
use App\Models\Artwork;
use App\Models\Post;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
class ArtworkSharedNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(
public readonly Post $post,
public readonly Artwork $artwork,
public readonly User $sharer,
) {}
public function via(object $notifiable): array
{
return ['database'];
}
public function databaseType(object $notifiable): string
{
return 'artwork_shared';
}
public function toDatabase(object $notifiable): array
{
return [
'type' => 'artwork_shared',
'post_id' => $this->post->id,
'artwork_id' => $this->artwork->id,
'artwork_title' => $this->artwork->title,
'sharer_id' => $this->sharer->id,
'sharer_name' => $this->sharer->name,
'sharer_username' => $this->sharer->username,
'message' => $this->sharer->name . ' shared your artwork "' . $this->artwork->title . '"',
'url' => "/@{$this->sharer->username}/posts",
];
}
}