Return the flight object with the bid

This commit is contained in:
Nabeel Shahzad
2018-02-27 13:11:48 -06:00
parent 4c22a098c1
commit a38b4e063b
3 changed files with 25 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource;
class Bid extends Resource
{
public function toArray($request)
{
$bid = parent::toArray($request);
$bid['flight'] = new Flight($this->flight);
return $bid;
}
}