26 lines
632 B
PHP
26 lines
632 B
PHP
<?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,
|
|
'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')
|
|
];
|
|
}
|
|
}
|