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 getIndex() { if (Request::ajax()) { $colleges = College::all(); $courses = Course::all(); $scholarships = Scholarship::all(); $students = Student::where('archived', 0)->get(); return compact('colleges', 'courses', 'scholarships', 'students'); } }
public function postUpdate($id) { return Scholarship::where('id', $id)->update(Input::get('data')); }
public function getScholarships() { $scholarships = Scholarship::all(); return view('admin.scholarshipsList', compact('scholarships')); }