phpvms/app/Http/Resources/Rank.php
2018-08-26 16:40:04 +00:00

24 lines
445 B
PHP

<?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,
'subfleets' => Subfleet::collection($this->subfleets),
];
}
}