/**
  * Preview before printing a record.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function preview($id)
 {
     $record = Baptism::find($id);
     $data = array('title' => 'Baptism', 'parish_name' => $record->parish->parish_name, 'parish_address' => $record->parish->parish_address, 'parish_priest' => $record->parish->parish_priest, 'parish_secretary' => $record->parish->parish_secretary, 'id' => $id, 'date_of_baptism' => $record->date_of_baptism, 'last_name' => $record->last_name, 'first_name' => $record->first_name, 'middle_name' => $record->middle_name, 'date_of_birth' => $record->date_of_birth, 'gender' => $record->gender, 'place_of_birth' => $record->place_of_birth, 'name_of_father' => $record->name_of_father, 'father_place_of_origin' => $record->father_place_of_origin, 'name_of_mother' => $record->name_of_mother, 'mother_place_of_origin' => $record->mother_place_of_origin, 'residence' => $record->residence, 'god_parents' => $record->god_parents, 'minister' => $record->minister, 'remarks' => $record->remarks, 'book_no' => $record->book_no, 'page_no' => $record->page_no, 'line_no' => $record->line_no);
     return view('baptism.preview')->with($data);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $data = array('title' => 'Dashboard', 'baptism_count' => Baptism::all()->count(), 'confirmation_count' => Confirmation::all()->count(), 'marriage_count' => Marriage::all()->count(), 'burial_count' => Burial::all()->count());
     return view('dashboard')->with($data);
 }