<?php

namespace App\Http\Resources\Security;

use Illuminate\Http\Resources\Json\ResourceCollection;

class IpBanCollection extends ResourceCollection
{
    public $collects = IpBanResource::class;

    public function toArray($request): array
    {
        return parent::toArray($request);
    }

    public function with($request): array
    {
        return [
            'meta' => [
                'total' => $this->resource->total() ?? null,
                'per_page' => $this->resource->perPage() ?? null,
                'current_page' => $this->resource->currentPage() ?? null,
                'last_page' => $this->resource->lastPage() ?? null,
            ],
        ];
    }
}
