/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { echo '<pre>'; $bid = Bid::with('sold', 'bought', 'seller', 'buyer')->findOrFail($id)->toArray(); print_r($bid); }
public static function getHighestBidWithId($id = -1) { return Bid::with('user')->where('auction_id', $id)->orderBy('price')->first(); }