We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf8b3ea commit 0005ab0Copy full SHA for 0005ab0
1 file changed
subdomains/database/migrations/002_create_subdomains_table.php
@@ -1,5 +1,6 @@
1
<?php
2
3
+use Boy132\Subdomains\Models\Subdomain;
4
use Illuminate\Database\Migrations\Migration;
5
use Illuminate\Database\Schema\Blueprint;
6
use Illuminate\Support\Facades\Schema;
@@ -28,6 +29,13 @@ public function up(): void
28
29
30
public function down(): void
31
{
32
+ Subdomain::all()->each(function (Subdomain $subdomain) {
33
+ try {
34
+ $subdomain->delete();
35
+ } catch (Exception) {
36
+ }
37
+ });
38
+
39
Schema::dropIfExists('subdomains');
40
}
41
};
0 commit comments