diff --git a/app/FreeCompanyLink.php b/app/FreeCompanyLink.php index 46d63f7..40f0a2a 100644 --- a/app/FreeCompanyLink.php +++ b/app/FreeCompanyLink.php @@ -24,11 +24,6 @@ class FreeCompanyLink extends Model return $this->hasMany(FreeCompanyRank::class, 'freeCompanyLinkId'); } - public function linkCodes() - { - return $this->hasMany(LinkCode::class, 'freeCompanyLinkId'); - } - public function userLinks() { return $this->hasMany(UserLink::class, 'freeCompanyLinkId'); diff --git a/app/LinkCode.php b/app/LinkCode.php index ff75c64..97a4035 100644 --- a/app/LinkCode.php +++ b/app/LinkCode.php @@ -9,7 +9,6 @@ class LinkCode extends Model public $timestamps = false; protected $fillable = [ - 'freeCompanyLinkId', 'lodestoneId', 'discordUserId', 'websiteUserId', @@ -20,9 +19,4 @@ class LinkCode extends Model protected $casts = [ 'expires' => 'datetime' ]; - - public function freeCompanyLink() - { - return $this->belongsTo(FreeCompanyLink::class, 'freeCompanyLinkId'); - } } diff --git a/database/migrations/2020_08_28_193013_create_link_codes_table.php b/database/migrations/2020_08_28_193013_create_link_codes_table.php index d55b6c4..a5c89d8 100644 --- a/database/migrations/2020_08_28_193013_create_link_codes_table.php +++ b/database/migrations/2020_08_28_193013_create_link_codes_table.php @@ -15,7 +15,6 @@ class CreateLinkCodesTable extends Migration { Schema::create('link_codes', function (Blueprint $table) { $table->id(); - $table->foreignId('freeCompanyLinkId')->constrained('free_company_links'); $table->bigInteger('lodestoneId'); $table->bigInteger('discordUserId')->nullable(); $table->bigInteger('websiteUserId')->nullable();