%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/camillo/camillo-api-master/app/Http/Resources/
Upload File :
Create Path :
Current File : /var/www/html/camillo/camillo-api-master/app/Http/Resources/MinorRelativeResource.php

<?php

namespace App\Http\Resources;

use Carbon\Carbon;
use Illuminate\Http\Resources\Json\JsonResource;

class MinorRelativeResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        $data =  [
            "id"                    => $this->id,
            "name"                  => $this->name,
            "surname"               => $this->surname,
            "gender"                => $this->gender,
            'relative'              => $this->pivot->relative
        ];
        return $data;
    }
}

Zerion Mini Shell 1.0