/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     try {
         Board::destroy($id);
     } catch (QueryException $ex) {
         return Redirect::back()->with('alert-warning', 'Board is in Use!');
     }
     return Redirect::route($this->route . 'index')->with('alert-success', 'Successfully Deleted!');
 }
 public function run()
 {
     Board::create(['name' => 'AICTE']);
     Board::create(['name' => 'CISCO']);
     Board::create(['name' => 'IGNOU']);
     Board::create(['name' => 'IIT']);
     Board::create(['name' => 'National Institute of Open School']);
     Board::create(['name' => 'Guwahati University']);
     Board::create(['name' => 'RED HAT']);
     Board::create(['name' => 'MICROSOFT']);
 }
 public function buildForm()
 {
     $this->add('exam_id', 'select', ['choices' => Exam::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Exam :', 'attr' => ['required']]);
     $this->add('board_id', 'select', ['choices' => Board::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Board/university :', 'attr' => ['required']]);
     $this->add('subject_id', 'select', ['choices' => Subject::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Subject/Trade :', 'attr' => []]);
     $this->add('specialization', 'text', ['attr' => ['maxlength' => '50', 'placeholder' => 'Specialization if any e.g. biology/chemistry'], 'label' => 'Specialization']);
     // $this->add('pass_year', 'text', [
     //     'attr' => ['maxlength' => '4', 'placeholder'=> 'year of passing'],
     //     'label' =>  'Pass Year'
     // ]);
     $this->add('pass_year', 'text', ['attr' => ['maxlength' => '4', 'placeholder' => 'year of passing'], 'label' => 'Pass Year']);
     $this->add('percentage', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => 'Percentage of marks'], 'label' => 'Percentage']);
     $this->add('save', 'submit', ['attr' => ['class' => 'btn btn-default btn-blue btn-lg']]);
     $this->add('update', 'submit', ['attr' => ['class' => 'btn btn-lg btn-success col-md-12']]);
 }