phpvms/app/Http/Resources/Rank.php

23 lines
439 B
PHP
Raw Normal View History

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource;
class Rank extends Resource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'name' => $this->name,
2018-01-07 05:23:35 +08:00
'subfleets' => Subfleet::collection($this->subfleets),
];
}
}