2019-08-27 00:32:46 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
2020-03-23 21:31:35 +08:00
|
|
|
use App\Contracts\Resource;
|
|
|
|
|
|
|
|
class AirportDistance extends Resource
|
2019-08-27 00:32:46 +08:00
|
|
|
{
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
|
|
|
$res = parent::toArray($request);
|
|
|
|
$res['distance'] = $res['distance']->getResponseUnits();
|
|
|
|
|
|
|
|
return $res;
|
|
|
|
}
|
|
|
|
}
|