This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccount/app/Http/Resources/API/AppUser.php

23 lines
480 B
PHP
Raw Permalink Normal View History

2019-06-20 17:07:17 +00:00
<?php
namespace App\Http\Resources\API;
use Illuminate\Http\Resources\Json\JsonResource;
class AppUser extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'user_id' => $this->user_id,
'username' => $this->getUser()->username,
'status' => $this->status
];
}
}