/** * Display a listing of pods * * @return Response */ public function index() { /*$pods = Pod::all(); foreach($pods as $pod){ //use this $group_schedule = $pod->groupSchedules()->get()->toArray(); echo '<pre>'; print_r($group_schedule); echo '</pre>'; $exp_schedule = $pod->expSchedules()->get()->toArray(); echo '<pre>'; print_r($exp_schedule); echo '</pre>'; //do not use // $group_schedule = $pod->groupSchedules[0]->toArray(); } die(); */ /*foreach($pods as $pod){ echo '<pre>'; print_r($pod); echo '</pre>'; foreach($pod->groupSchedules as $group_schedule){ echo '<pre>'; print_r($group_schedule); echo '</pre>'; } foreach($pod->expSchedules as $exp_schedule){ echo '<pre>'; print_r($exp_schedule); echo '</pre>'; } }*/ $pods = Pod::all(); return View::make('pods.index', compact('pods')); }