testing
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user