2017-12-13 06:58:27 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
|
|
|
use Illuminate\Http\Resources\Json\Resource;
|
|
|
|
|
|
|
|
class UserBid extends Resource
|
|
|
|
{
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
|
|
|
return [
|
2018-03-20 09:50:40 +08:00
|
|
|
'id' => $this->id,
|
|
|
|
'user_id' => $this->user_id,
|
2017-12-13 06:58:27 +08:00
|
|
|
'flight_id' => $this->flight_id,
|
2018-03-20 09:50:40 +08:00
|
|
|
'flight' => Flight::collection($this->whenLoaded('flight'))
|
2017-12-13 06:58:27 +08:00
|
|
|
#'created_at' => $this->created_at,
|
|
|
|
#'updated_at' => $this->updated_at,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|