public function run() { DB::table('auctions')->delete(); $collection = []; foreach ($collection as $record) { Auction::create($record); } }
public function update($id) { // save updated $record = $this->records->find($id); if (!$record) { Auction::create(Input::all()); return $this->respond($record); } $record->fill(Input::all())->save(); return $this->respond($record); }