23 lines
480 B
PHP
23 lines
480 B
PHP
|
<?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
|
||
|
];
|
||
|
}
|
||
|
}
|