phpvms/app/Http/Resources/Rank.php

24 lines
428 B
PHP
Raw Normal View History

<?php
namespace App\Http\Resources;
use App\Contracts\Resource;
class Rank extends Resource
{
/**
* Transform the resource into an array.
*
2018-08-27 00:40:04 +08:00
* @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),
];
}
}