<?php

namespace Modules\Notification\Http\Controllers;

use App\Functions\ResponseHelper;
use App\Http\Controllers\BasicController;
use Modules\Notification\Entities\Model;
use Modules\Notification\Http\Resources\NotificationResource;

class APIController extends BasicController
{
    public function index()
    {
        $Models = Model::where('client_id', auth('sanctum')->id())
            ->orderByDesc('id')
            ->paginate(15);
        $Models->data = NotificationResource::collection($Models);

        return ResponseHelper::make($Models);
    }
}
