/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('religions')->truncate();
     $Christianity = Religion::create(array('religion' => 'Christianity'));
     $Islam = Religion::create(array('religion' => 'Islam'));
     $Judaism = Religion::create(array('religion' => 'Judaism '));
     $Others = Religion::create(array('religion' => 'Others'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data['student'] = Student::find($id);
     $data['title'] = 'Edit ' . $data['student']->fname;
     $data['students_menu'] = 1;
     $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select');
     $data['bloodGroups'] = BloodGroup::lists('blood_group', 'id')->prepend('Please Select');
     $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select');
     $data['states'] = State::lists('name', 'id')->prepend('Please Select');
     $data['countries'] = Country::lists('name', 'id')->prepend('Please Select');
     $data['parents'] = StudentParent::select(\DB::raw('concat (fname," ",lname) as full_name, id'))->lists('full_name', 'id')->prepend('Please Select');
     $data['classes'] = StudentClass::lists('name', 'id')->prepend('Please Select');
     $data['religions'] = Religion::lists('religion', 'id')->prepend('Please Select');
     return view('admin.students.edit', $data);
 }
Example #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $religions = Religion::find($id);
     $religions->delete();
     Session::flash('message', 'You have successfully deleted customer');
     return Redirect::to('religions');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Religion::where('id', $id)->delete();
     response()->json(['deleted' => 'success']);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data['parent'] = StudentParent::find($id);
     $data['parents_menu'] = 1;
     $data['title'] = 'Edit Parent';
     $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select');
     $data['bloodGroups'] = BloodGroup::lists('blood_group', 'id')->prepend('Please Select');
     $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select');
     $data['states'] = State::lists('name', 'id')->prepend('Please Select');
     $data['countries'] = Country::lists('name', 'id')->prepend('Please Select');
     $data['religions'] = Religion::lists('religion', 'id')->prepend('Please Select');
     return view('admin.parents.edit', $data);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $students = Student::find($id);
     $faculties = Faculty::lists('faculty_name', 'faculty_code');
     $studies = Study::lists('study_name', 'id');
     $programStudies = ProgramStudy::lists('name', 'id');
     $academicRegistrations = AcademicRegistration::lists('academic_year', 'id');
     $religions = Religion::lists('name', 'id');
     return view('dashboard.admin.student.edit', ['student' => $students, 'faculty' => $faculties, 'study' => $studies, 'programStudy' => $programStudies, 'academicRegistration' => $academicRegistrations, 'religion' => $religions]);
 }