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

39 lines
1.2 KiB
PHP
Raw Normal View History

2019-06-06 13:44:45 +00:00
<?php
namespace App\Http\Resources\API;
use Illuminate\Http\Resources\Json\JsonResource;
class AppForOwner extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => (int)$this->id,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'name' => $this->name,
'description' => $this->description,
'url' => $this->url,
'directUrl' => $this->direct_url,
'apiKey' => $this->apiKey,
'apiSecret' => $this->apiSecret,
'properties' => [
'testingWarning' => $this->testing_warning,
'autoAccept' => $this->auto_accept,
'untrustedWarning' => $this->untrusted_warning,
'showOnWebpage' => $this->show_on_webpage,
'stopAutoRedirect' => $this->stop_auto_redirect,
'hideInAppList' => $this->hide_in_app_list,
'userCantRemoveApp' => $this->user_cant_remove_app
]
];
}
}