6
0
Fork 0
jiqu-library-server/app/Endpoint/Api/Http/Resources/AppVersionResource.php

28 lines
733 B
PHP

<?php
namespace App\Endpoint\Api\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class AppVersionResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return [
'title'=>$this->title,
'context'=>$this->context,
'name' => (string) $this->name,
'v' => (int) $this->v,
'is_force' => (bool) $this->is_force,
'apk_link' => (string) $this->apk_link,
'wgt_link' => (string) $this->wgt_link,
];
}
}