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/AppAccessDetails.php

27 lines
632 B
PHP
Raw Permalink Normal View History

2019-09-25 07:56:36 +00:00
<?php
namespace App\Http\Resources\API;
use Illuminate\Http\Resources\Json\JsonResource;
class AppAccessDetails extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
$app = $this->getApp();
return [
'id' => $this->id,
2019-09-25 07:56:36 +00:00
'app' => new App($app),
'status' => $this->status,
'created' => $this->created_at->format('Y-m-d H:i:s e'),
'updated' => $this->created_at->format('Y-m-d H:i:s e')
];
}
}