コード例 #1
0
ファイル: PrefixSeeder.php プロジェクト: vanherba/linda
 /**
  * Seed the prefixes table based on the prefixes json file
  *
  * @return void
  */
 private function seedPrefixes()
 {
     // Empty the ontology table
     \Prefix::truncate();
     // Fetch the ontology from the json file
     $prefixes = json_decode(file_get_contents(app_path() . '/database/seeds/data/prefixes.json'), true);
     foreach ($prefixes as $prefix => $uri) {
         \Prefix::create(array('prefix' => $prefix, 'uri' => $uri));
     }
     $this->command->info("Added the prefixes and corresponding uri's.");
 }