protected function addSg() { // Singapore details. // TODO: improve this by offering a checkbox for SG, MY and textbox for others? $this->add('nationality', 'text')->add('is_singapore_pr', 'checkbox', ['label' => 'Singapore PR?'])->add('nric', 'text', ['label' => 'NRIC (Upper Case)'])->add('scholarship_id', 'entity', ['label' => 'Scholarship', 'class' => 'App\\Scholarship', 'selected' => Scholarship::where('name', 'None')->value('id')]); return $this; }
public function postUpdate($id) { return Scholarship::where('id', $id)->update(Input::get('data')); }