We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56dc98c commit c27f61eCopy full SHA for c27f61e
1 file changed
src/Install.php
@@ -22,6 +22,7 @@ class Install
22
public static function install()
23
{
24
static::installByRelation();
25
+ static::removeLaravelDbFromBootstrap();
26
}
27
28
/**
@@ -57,4 +58,21 @@ public static function installByRelation()
57
58
59
60
61
+ /**
62
+ * @return void
63
+ */
64
+ protected static function removeLaravelDbFromBootstrap(): void
65
+ {
66
+ $file = base_path('config/bootstrap.php');
67
+ if (!is_file($file)) {
68
+ return;
69
+ }
70
+ $pattern = '/^\s*support\\\\bootstrap\\\\LaravelDb::class,?\s*?\r?\n/m';
71
+ $content = file_get_contents($file);
72
+ if (preg_match($pattern, $content)) {
73
+ $updatedContent = preg_replace($pattern, '', $content);
74
+ file_put_contents($file, $updatedContent);
75
76
77
+
78
0 commit comments