/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     DB::table('type_infrastructures')->delete();
     $infrastructures = array(['type' => 'kindergartens'], ['type' => 'schools'], ['type' => 'high schools'], ['type' => 'colleges'], ['type' => 'school groups'], ['type' => 'public buildings']);
     foreach ($infrastructures as $infrastructure) {
         Infrastructure::create($infrastructure);
     }
     Model::reguard();
 }
 public function index()
 {
     $infrastructures = Infrastructure::all();
     return $infrastructures;
 }