コード例 #1
0
 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'));
 }
コード例 #2
0
 public function show($id)
 {
     $specie = MammalTaxonomy::find($id);
     $taxaitems = array('kingdom', 'phylum', 'class', 'subclass', 'order', 'suborder', 'infraorder', 'superfamily', 'family', 'subfamily', 'tribe', 'genus', 'subgenus', 'species', 'subspecies');
     return view('taxonomy.info', compact('specie', 'taxaitems'));
 }