feat: add guest notification center
This commit is contained in:
30
app/Http/Resources/Tenant/GuestNotificationResource.php
Normal file
30
app/Http/Resources/Tenant/GuestNotificationResource.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Tenant;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin \App\Models\GuestNotification */
|
||||
class GuestNotificationResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'type' => $this->type->value,
|
||||
'title' => $this->title,
|
||||
'body' => $this->body,
|
||||
'status' => $this->status->value,
|
||||
'audience_scope' => $this->audience_scope->value,
|
||||
'target_identifier' => $this->target_identifier,
|
||||
'payload' => $this->payload,
|
||||
'priority' => $this->priority,
|
||||
'expires_at' => $this->expires_at?->toISOString(),
|
||||
'created_at' => $this->created_at?->toISOString(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user