Example #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function home()
 {
     //display all missing person
     //$people = Person::latest('updated_at')->get();
     $people = Person::latest('updated_at')->paginate(4);
     return view('pages.home', compact('people'));
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show(Family $family)
 {
     $id = $family->id;
     $mother = Person::latest('created_at')->where('id', '=', $family->mother_id)->first();
     $father = Person::latest('created_at')->where('id', '=', $family->father_id)->first();
     $kids = FamilyController::get_kids_of_family($family);
     $images = Image::where('family', $id)->orderBy('year', 'asc')->get();
     $featured_image = Image::latest('created_at')->orderBy('year', 'asc')->Where('family', $id)->Where('featured', 1)->get();
     return view('family.show', compact('family', 'kids', 'images', 'mother', 'father', 'featured_image'));
 }
Example #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $people = Person::latest()->get();
     return view('person.index', compact('people'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //display all missing person
     $people = Person::latest('updated_at')->paginate(6);
     return view('people.index', compact('people'));
 }