public function create() { if (Auth::guest()) { return view('welcome'); } $locality_natures = LocalityNature::all(); $municipes = DB::table('provinces')->select('id', 'province', 'municipe')->get(); $provinces = DB::table('provinces')->select('province')->distinct()->get(); $coords_sources = CoordsSource::all(); $localidades = Auth::User()->gazeteer; return view('gazeteer.create', compact('locality_natures', 'provinces', 'municipes', 'coords_sources', 'species', 'localidades')); }
public function create() { if (Auth::guest()) { return view('welcome'); } $locality_natures = LocalityNature::all(); $municipes = DB::table('provinces')->select('id', 'province', 'municipe')->get(); $provinces = DB::table('provinces')->select('province')->distinct()->get(); $coords_sources = CoordsSource::all(); $species = MammalTaxonomy::all(); if (Auth::user()->institutional) { $basis_of_records = BasisOfRecord::all(); } else { $basis_of_records = BasisOfRecord::where('id', '1')->get(); } $localidades = Auth::User()->gazeteer; return view('records.create', compact('locality_natures', 'coords_sources', 'provinces', 'municipes', 'species', 'localidades', 'basis_of_records')); }