This commit is contained in:
2026-03-15 18:13:33 -05:00
parent 82cc28541c
commit 7b058c7e57
3 changed files with 36 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models\Lookup;
use Illuminate\Database\Eloquent\Model;
class SolarSystem extends Model
{
public $table = 'solar_systems';
public $primaryKey = 'id';
public $timestamps = false;
/**
* The attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'name',
'solar_system_id',
];
}
@@ -119,6 +119,14 @@ return new class extends Migration
});
}
if(!Schema::hasTable('solar_systems')) {
Schema::create('solar_systems', function(Blueprint $table) {
$table->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');
}
};
+3 -1
View File
@@ -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,