diff --git a/app/Models/Lookup/SolarSystem.php b/app/Models/Lookup/SolarSystem.php new file mode 100644 index 0000000..e4fdd11 --- /dev/null +++ b/app/Models/Lookup/SolarSystem.php @@ -0,0 +1,24 @@ +id(); + $table->string('name'); + $table->unsignedBigInteger('solar_system_id'); + }) + } + } /** @@ -131,5 +139,6 @@ return new class extends Migration Schema::dropIfExists('character_lookup'); Schema::dropIfExists('corporation_lookup'); Schema::dropIfExists('alliance_lookup'); + Schema::dropIfExists('solar_systems'); } }; diff --git a/database/seeders/SolarSystemSeeder.php b/database/seeders/SolarSystemSeeder.php index 277b9a6..2366982 100644 --- a/database/seeders/SolarSystemSeeder.php +++ b/database/seeders/SolarSystemSeeder.php @@ -12,6 +12,8 @@ use Seat\Eseye\Containers\EsiAuthentication; use Seat\Eseye\Eseye; use Seat\Eseye\Exceptions\RequestFailedException; +use App\Models\Lookups\SolarSystem; + class SolarSystemSeeder extends Seeder { /** @@ -33,7 +35,7 @@ class SolarSystemSeeder extends Seeder return; } - DB::updateOrCreate([ + SolarSystem::updateOrCreate([ 'solar_system_id' => $system, ],[ 'name' => $info->name,