Ejemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     // get all the nerds
     $nerds = Nerd::all();
     // load the view and pass the nerds
     return view('nerds.index')->with('nerds', $nerds);
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //        get all nerds
     $nerds = Nerd::all();
     //        load the view and pass the $nerds
     return view('nerds.index', compact('nerds'));
     //        return $nerds[0];
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // = WAYI:
     // Get all nerds
     $nerds = Nerd::all();
     $page_title = 'Nerds List';
     $page_desc = 'All nerds here';
     // Load the view and pass the nerds
     return view('nerds.index', ['nerds' => $nerds, 'page_title' => $page_title, 'page_description' => $page_desc]);
 }
Ejemplo n.º 4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $nerds = Nerd::all();
     return view('nerds.index', ['nerds' => $nerds]);
 }