Here I have code that store my $auction into auction database:
public function store(Requests\OfferRequest $request)
{
$auction= new Auction($request->all());
Auth::user()->auctions()->save($auction);
}
Now I from request get $from and $to fields:
$auction->from //return me start date for auction
$auction->to // return me end date for auction
Now I want to store into maxoffers database - rows, foreach date between 'from' and 'to' and this rows just to have auction_id = $auction->id; and price = $auction->price ... other fields to be empty...
How I can do that? So how to make foreach date between from and to and store id of auction and price from request...