diff --git a/database/migrations/2022_02_01_235539_create_subscriptions_table.php b/database/migrations/2022_02_01_235539_create_subscriptions_table.php index 5cf7c64..c5325e3 100644 --- a/database/migrations/2022_02_01_235539_create_subscriptions_table.php +++ b/database/migrations/2022_02_01_235539_create_subscriptions_table.php @@ -15,7 +15,7 @@ public function up() { Schema::create('subscriptions', function (Blueprint $table) { $table->id(); - $table->foreignIdFor(\LucasDotVin\Soulbscription\Models\Plan::class); + $table->foreignIdFor(config('soulbscription.models.plan'))->constrained(); $table->timestamp('canceled_at')->nullable(); $table->timestamp('expired_at')->nullable(); $table->timestamp('grace_days_ended_at')->nullable(); diff --git a/database/migrations/2022_02_02_000527_create_feature_consumptions_table.php b/database/migrations/2022_02_02_000527_create_feature_consumptions_table.php index 526eb92..9a4b463 100644 --- a/database/migrations/2022_02_02_000527_create_feature_consumptions_table.php +++ b/database/migrations/2022_02_02_000527_create_feature_consumptions_table.php @@ -16,7 +16,7 @@ public function up() $table->id(); $table->decimal('consumption')->unsigned()->nullable(); $table->timestamp('expired_at')->nullable(); - $table->foreignIdFor(\LucasDotVin\Soulbscription\Models\Feature::class)->constrained()->cascadeOnDelete(); + $table->foreignIdFor(config('soulbscription.models.feature'))->constrained()->cascadeOnDelete(); $table->timestamps(); if (config('soulbscription.models.subscriber.uses_uuid')) { diff --git a/database/migrations/2022_02_03_001206_create_subscription_renewals_table.php b/database/migrations/2022_02_03_001206_create_subscription_renewals_table.php index beeaa12..2d4cfa5 100644 --- a/database/migrations/2022_02_03_001206_create_subscription_renewals_table.php +++ b/database/migrations/2022_02_03_001206_create_subscription_renewals_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class() extends Migration { /** * Run the migrations. * @@ -16,7 +16,7 @@ public function up() $table->id(); $table->boolean('overdue'); $table->boolean('renewal'); - $table->foreignIdFor(\LucasDotVin\Soulbscription\Models\Subscription::class); + $table->foreignIdFor(config('soulbscription.models.subscription'))->constrained(); $table->timestamps(); }); } diff --git a/database/migrations/2022_02_04_001622_create_feature_plan_table.php b/database/migrations/2022_02_04_001622_create_feature_plan_table.php index c86f672..fded068 100644 --- a/database/migrations/2022_02_04_001622_create_feature_plan_table.php +++ b/database/migrations/2022_02_04_001622_create_feature_plan_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class() extends Migration { /** * Run the migrations. * @@ -15,8 +15,8 @@ public function up() Schema::create('feature_plan', function (Blueprint $table) { $table->id(); $table->decimal('charges')->nullable(); - $table->foreignIdFor(\LucasDotVin\Soulbscription\Models\Feature::class)->constrained()->cascadeOnDelete(); - $table->foreignIdFor(\LucasDotVin\Soulbscription\Models\Plan::class)->constrained()->cascadeOnDelete(); + $table->foreignIdFor(config('soulbscription.models.feature'))->constrained()->cascadeOnDelete(); + $table->foreignIdFor(config('soulbscription.models.plan'))->constrained()->cascadeOnDelete(); $table->timestamps(); }); } diff --git a/database/migrations/2022_02_25_001622_create_feature_tickets_table.php b/database/migrations/2022_02_25_001622_create_feature_tickets_table.php index f384584..d303811 100644 --- a/database/migrations/2022_02_25_001622_create_feature_tickets_table.php +++ b/database/migrations/2022_02_25_001622_create_feature_tickets_table.php @@ -16,7 +16,7 @@ public function up() $table->id(); $table->decimal('charges')->nullable(); $table->timestamp('expired_at')->nullable(); - $table->foreignIdFor(\LucasDotVin\Soulbscription\Models\Feature::class)->constrained()->cascadeOnDelete(); + $table->foreignIdFor(config('soulbscription.models.feature'))->constrained()->cascadeOnDelete(); $table->timestamps(); if (config('soulbscription.models.subscriber.uses_uuid')) {