<?php

namespace App\Resources;

use App\Models\Tenant;
use Illuminate\Http\Resources\Json\JsonResource;

class LocalGroupResource extends JsonResource {
    public function __construct(Tenant $tenant) {
        parent::__construct($tenant);
    }

    public function toArray($request) : array {
        return [
            'id' => $this->resource->id,
            'name' => $this->resource->name,
            'email' => $this->resource->email,
            'city' => $this->resource->city,
            'postalcode' => $this->resource->postcode,
            'slug' => $this->resource->slug,
        ];
    }
}
