%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/api/app/Transformers/
Upload File :
Create Path :
Current File : /var/www/html/hr/api/app/Transformers/NotificationTransformer.php

<?php

namespace App\Transformers;

use App\Models\Notification;

class NotificationTransformer extends BaseTransformer
{
    public function transform(Notification $notification)
    {
        return [
            'id'         => $notification->id,
            'title'      => $notification->title,
            'message'    => $notification->message,
            'is_read'    => $notification->is_read,
            'read_at'    => $notification->read_at,
            'model_type' => $notification->model_type,
            'model_id'   => $notification->model_id,
            'type'       => $notification->type
                ?: Notification::TYPE_INFO,
            'sent_at'    => $notification->created_at,
        ];
    }
}

Zerion Mini Shell 1.0