/** * 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); }
/** * Preview before printing a record. * * @param int $id * @return \Illuminate\Http\Response */ public function preview($id) { $record = Marriage::find($id); $data = array('title' => 'Marriage', '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_marriage' => $record->date_of_marriage, 'name_of_bride' => $record->name_of_bride, 'status_of_bride' => $record->status_of_bride, 'age_of_bride' => $record->age_of_bride, 'origin_of_bride' => $record->origin_of_bride, 'residence_of_bride' => $record->residence_of_bride, 'father_of_bride' => $record->father_of_bride, 'mother_of_bride' => $record->mother_of_bride, 'name_of_groom' => $record->name_of_groom, 'status_of_groom' => $record->status_of_groom, 'age_of_groom' => $record->age_of_groom, 'origin_of_groom' => $record->origin_of_groom, 'residence_of_groom' => $record->residence_of_groom, 'father_of_groom' => $record->father_of_groom, 'mother_of_groom' => $record->mother_of_groom, 'minister' => $record->minister, 'witnesses' => $record->witnesses, 'remarks' => $record->remarks, 'book_no' => $record->book_no, 'page_no' => $record->page_no, 'line_no' => $record->line_no); return view('marriage.preview')->with($data); }