/** * Display a listing of the resource. * * @param null $group * * @return Response */ public function index($group = null) { $devices = $group ? Device::where('group', $group)->get() : Device::onHomePage()->get(); return $this->respond(['data' => $this->transformer->transformCollection($devices->all()), 'server_time' => Carbon::now()->toIso8601String()]); }
/** * Show the application welcome screen to the user. * * @return Response */ public function index() { $devices = Device::onHomePage()->get(); return view('overview')->with(compact('devices')); }