public function update($id) { // save updated $record = $this->records->find($id); if (!$record) { Distributor::create(Input::all()); return $this->respond($record); } $record->fill(Input::all())->save(); return $this->respond($record); }
/** * @param Distributor $record * @return mixed */ function getInfoWindow(Distributor $record) { $html = $this->customise($record->Details())->renderWith(array("DistributorInfoWindow")); return $html->Value; }