public function edit($id)
 {
     $view = Auth::user()->getView();
     $samplingSites = Samplingsite::all();
     $sampling = Sampling::findOrFail($id);
     return view('samplings.edit', compact('sampling', 'samplingSites', 'view'));
 }
 public function index(Request $request)
 {
     $view = Auth::user()->getView();
     $lugars = Samplingsite::all();
     $wates = Watersource::all();
     //dd($watersources);
     return view('reports.capacity.index', compact('lugars', 'wates', 'view'));
 }
 public function index(Request $request)
 {
     $view = Auth::user()->getView();
     if (Auth::user()->getRol() == "Gestor") {
         $samplingSites = Samplingsite::allAgent();
     } else {
         $samplingSites = Samplingsite::all();
     }
     return view('samplingSites.index', compact('samplingSites', 'view'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $view = Auth::user()->getView();
     $idEntity = Auth::user()->idEntity();
     $tipo = Auth::user()->getRol();
     if ($tipo == "Gestor") {
         $samplingSites = \DB::select("select * from sampling_site where agent_id  =" . $idEntity);
     } else {
         $samplingSites = Samplingsite::all();
     }
     return view('reports.quality.index', compact('samplingSites', 'view'));
 }