update api register
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Notification;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class SystemNotificationCampaignResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id, 'uuid' => $this->uuid, 'tenant_id' => $this->tenant_id,
|
||||
'title' => $this->title, 'body' => $this->body, 'action_url' => $this->action_url,
|
||||
'icon' => $this->icon, 'audience' => $this->audience, 'status' => $this->status,
|
||||
'estimated_recipients' => $this->estimated_recipients,
|
||||
'processed_recipients' => $this->processed_recipients,
|
||||
'tenant' => $this->whenLoaded('tenant'), 'creator' => $this->whenLoaded('creator'),
|
||||
'completed_at' => $this->completed_at, 'created_at' => $this->created_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user