@@ 104-118 (lines=15) @@ | ||
101 | ||
102 | $this->task( |
|
103 | 'Updating .gitignore', |
|
104 | function () { |
|
105 | ||
106 | $gitignorePath = base_path('.gitignore'); |
|
107 | if (File::exists($gitignorePath)) { |
|
108 | $contents = File::get($gitignorePath); |
|
109 | $neededLine = '/database/database.sqlite'; |
|
110 | if (! Str::contains($contents, $neededLine)) { |
|
111 | File::append($gitignorePath, $neededLine . PHP_EOL); |
|
112 | ||
113 | return true; |
|
114 | } |
|
115 | } |
|
116 | ||
117 | return false; |
|
118 | } |
|
119 | ); |
|
120 | ||
121 | $this->info('Usage:'); |
@@ 62-74 (lines=13) @@ | ||
59 | } |
|
60 | ); |
|
61 | ||
62 | $this->task('Updating .gitignore', function () { |
|
63 | $gitignorePath = base_path('.gitignore'); |
|
64 | if (File::exists($gitignorePath)) { |
|
65 | $contents = File::get($gitignorePath); |
|
66 | $neededLine = '.env'; |
|
67 | if (! Str::contains($contents, $neededLine)) { |
|
68 | File::append($gitignorePath, $neededLine . PHP_EOL); |
|
69 | return true; |
|
70 | } |
|
71 | } |
|
72 | ||
73 | return false; |
|
74 | }); |
|
75 | } |
|
76 | } |
|
77 |