Esempio n. 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //Get the markers
     $marker = Bulb::find($id);
     //Get clusters
     //$clusters = DB::table($cluster_tbl)->lists('clusterid','name');
     $clusters = Cluster::all();
     $clustersCount = Cluster::all()->count();
     //Get bulbs
     $bulbs = Bulb::all();
     $bulbsCount = Bulb::all()->count();
     //Get readings
     $readings = Poweranalyzer::all();
     $readingsCount = count($readings);
     //Get schedules
     $schedules = Schedule::all();
     $schedulesCount = Schedule::all()->count();
     return View::make('bulb')->with('marker', $marker)->with('clusters', $clusters)->with('clustersCount', $clustersCount)->with('bulbs', $bulbs)->with('bulbsCount', $bulbsCount)->with('readings', $readings)->with('readingsCount', $readingsCount)->with('schedules', $schedules)->with('schedulesCount', $schedulesCount);
     //return $marker;
 }