/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $guardians = array(['name' => 'cali ciise', 'tel' => '123-123-456', 'date_of_birth' => date("Y-m-d")]);
     foreach ($guardians as $guardian) {
         Guardian::create($guardian);
     }
 }
Пример #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $parents = Guardian::all();
     $learner = $this->learner->find($id);
     return view('learners.edit')->with('title', 'SMS| Edit Learners Details')->with('learner', $learner)->with('parents', $parents);
 }
Пример #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Guardian $parent)
 {
     return view('parents.index')->with('parents', $parent->all());
 }
Пример #4
0
 /**
  * Delete the Guardian
  * @param  int $id 
  * @return \Illumination\Http\Redirect
  */
 public function deleteGuardian($id)
 {
     $guardian = \App\Guardian::findOrFail($id);
     $guardian->delete();
     return redirect()->route('register.list');
 }
 public function store(RegisterGuardian $request)
 {
     Guardian::create($request->all());
 }