Example #1
0
 /**
  * Shortcut method for placing a bid.
  *
  * @param float                  $amount
  * @param \Hamjoint\Mustard\User $user
  *
  * @return void
  */
 public function placeBid($amount, User $user)
 {
     $bid = new \Hamjoint\Mustard\Auctions\Bid();
     $bid->amount = $amount;
     $bid->placed = time();
     $bid->bidder()->associate($user);
     $bid->item()->associate($this);
     $bid->save();
 }