/** * Add a Customer */ public function onNewCustomer() { $peep = new Peep(); $peep->name = post('name'); $peep->save(); $this->peeplist = $this->page['peeplist'] = Peep::selector($peep->id, array('class' => 'form-control custom-select', 'id' => 'peep_id')); }
public function getPeepIdOptions() { if (count($this->peepOptions)) { return $this->peepOptions; } return $this->peepOptions = Peep::orderBy('name')->lists('name', 'id'); }