%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/UserResource.php

<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class UserResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            "email" => $this->email,
            "role" => $this->userType->role,
            "individual" => $this->individual
        ];
    }
}

Zerion Mini Shell 1.0