Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit a52c6cb

Browse files
author
Andrey Helldar
committed
Updated the Laravel Sync command
1 parent 2b14199 commit a52c6cb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/Frameworks/Laravel/Console/Sync.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,26 @@
77

88
final class Sync extends Command
99
{
10-
protected $signature = 'env:sync {--path=}';
10+
protected $signature = 'env:sync {--path= : Gets the path to scan for files}';
1111

1212
protected $description = 'Synchronizing environment settings with a preset.';
1313

1414
public function handle(Syncer $syncer)
15+
{
16+
$this->info('Searching...');
17+
18+
$filename = $this->filename();
19+
20+
$this->sync($syncer, $filename);
21+
22+
$this->info("The found keys were successfully saved to the {$filename} file.");
23+
}
24+
25+
protected function sync(Syncer $syncer, string $filename): void
1526
{
1627
$syncer
1728
->path($this->path())
18-
->filename($this->filename())
29+
->filename($filename)
1930
->store();
2031
}
2132

0 commit comments

Comments
 (0)