@@ 104-118 (lines=15) @@ | ||
101 | ||
102 | $this->task( |
|
103 | 'Updating .gitignore', |
|
104 | function () { |
|
105 | $gitignorePath = base_path('.gitignore'); |
|
106 | if (File::exists($gitignorePath)) { |
|
107 | $contents = File::get($gitignorePath); |
|
108 | $neededLine = '/database/database.sqlite'; |
|
109 | if (! Str::contains($contents, $neededLine)) { |
|
110 | File::append($gitignorePath, $neededLine.PHP_EOL); |
|
111 | ||
112 | return true; |
|
113 | } |
|
114 | } |
|
115 | ||
116 | return false; |
|
117 | } |
|
118 | ); |
|
119 | ||
120 | $this->info('Usage:'); |
|
121 | $this->comment( |
@@ 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 | ||
70 | return true; |
|
71 | } |
|
72 | } |
|
73 | ||
74 | return false; |
|
75 | }); |
|
76 | } |
|
77 | } |