コード例 #1
0
ファイル: MembersSignupForm.php プロジェクト: CUMSA/members
 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;
 }
コード例 #2
0
 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');
     }
 }
コード例 #3
0
 public function postUpdate($id)
 {
     return Scholarship::where('id', $id)->update(Input::get('data'));
 }
コード例 #4
0
 public function getScholarships()
 {
     $scholarships = Scholarship::all();
     return view('admin.scholarshipsList', compact('scholarships'));
 }