2017-12-13 06:58:27 +08:00
|
|
|
<?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),
|
2017-12-13 06:58:27 +08:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|