@@ -18,9 +18,9 @@ |
||
| 18 | 18 | ]; |
| 19 | 19 | |
| 20 | 20 | protected $listFilesSeeder = [ |
| 21 | - 'CountryTableSeeder' => 'CountryTableSeeder.php', |
|
| 22 | - 'RegionsTableSeeder' => 'RegionsTableSeeder.php', |
|
| 23 | - 'CitiesTableSeeder' => 'CitiesTableSeeder.php' |
|
| 21 | + 'CountryTableSeeder' => 'CountryTableSeeder.php', |
|
| 22 | + 'RegionsTableSeeder' => 'RegionsTableSeeder.php', |
|
| 23 | + 'CitiesTableSeeder' => 'CitiesTableSeeder.php' |
|
| 24 | 24 | ]; |
| 25 | 25 | |
| 26 | 26 | protected $formatterStyle; |
@@ -50,17 +50,17 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $this->progressBar->start(); |
| 52 | 52 | |
| 53 | - $this->move( $this->progressBar, [ |
|
| 53 | + $this->move($this->progressBar, [ |
|
| 54 | 54 | 'inLaravel' => $_SERVER["PWD"] . '/database/migrations/', |
| 55 | 55 | 'stubs' => __DIR__ . '/../database/migrations/stubs/' |
| 56 | 56 | ], $this->listFileMigrations); |
| 57 | 57 | |
| 58 | - $this->move( $this->progressBar, [ |
|
| 58 | + $this->move($this->progressBar, [ |
|
| 59 | 59 | 'inLaravel' => $_SERVER["PWD"] . '/database/seeds/', |
| 60 | 60 | 'stubs' => __DIR__ . '/../database/seeds/stubs/' |
| 61 | - ], $this->listFilesSeeder ); |
|
| 61 | + ], $this->listFilesSeeder); |
|
| 62 | 62 | |
| 63 | - $this->moveConfig( $this->progressBar ); |
|
| 63 | + $this->moveConfig($this->progressBar); |
|
| 64 | 64 | |
| 65 | 65 | $this->progressBar->finish(); |
| 66 | 66 | $output->writeln(['']); |
@@ -83,10 +83,10 @@ discard block |
||
| 83 | 83 | protected function moveConfig(ProgressBar $progress) |
| 84 | 84 | { |
| 85 | 85 | $pathToConfig = __DIR__ . '/../config.php'; |
| 86 | - $pathToConfigsLaravel = $_SERVER["PWD"] . '/config/'; |
|
| 86 | + $pathToConfigsLaravel = $_SERVER["PWD"] . '/config/'; |
|
| 87 | 87 | $this->createDir($pathToConfigsLaravel); |
| 88 | 88 | |
| 89 | - copy($pathToConfig,$pathToConfigsLaravel . 'geography.php' ); |
|
| 89 | + copy($pathToConfig, $pathToConfigsLaravel . 'geography.php'); |
|
| 90 | 90 | $progress->advance(); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -119,8 +119,8 @@ discard block |
||
| 119 | 119 | protected function getDateNormalize() |
| 120 | 120 | { |
| 121 | 121 | $date = Carbon::now(); |
| 122 | - $date = preg_replace('/-|\s/','_', $date); |
|
| 123 | - $data = preg_replace('/:/','', $date); |
|
| 122 | + $date = preg_replace('/-|\s/', '_', $date); |
|
| 123 | + $data = preg_replace('/:/', '', $date); |
|
| 124 | 124 | |
| 125 | 125 | return $data; |
| 126 | 126 | } |
@@ -90,8 +90,8 @@ |
||
| 90 | 90 | $this->settings['databasePassword'] = $helper->ask($input, $output, $question); |
| 91 | 91 | |
| 92 | 92 | |
| 93 | - $table = new Table($output); |
|
| 94 | - $table->setHeaders(array('name', 'value')) |
|
| 93 | + $table = new Table($output); |
|
| 94 | + $table->setHeaders(array('name', 'value')) |
|
| 95 | 95 | ->setRows(array( |
| 96 | 96 | array('Type database', $this->settings['databaseType']), |
| 97 | 97 | array('Host database', $this->settings['host']), |
@@ -55,30 +55,30 @@ discard block |
||
| 55 | 55 | $this->settings['databaseType'] = $helper->ask($input, $output, $question); |
| 56 | 56 | |
| 57 | 57 | $output->writeln(''); |
| 58 | - $output->writeln( " You have just selected: <info>{$this->settings['databaseType']}</info>"); |
|
| 58 | + $output->writeln(" You have just selected: <info>{$this->settings['databaseType']}</info>"); |
|
| 59 | 59 | |
| 60 | 60 | $helper = $this->getHelper('question'); |
| 61 | 61 | $question = new Question("Enter <info>host</info> for database , please : ", 'localhost'); |
| 62 | 62 | |
| 63 | 63 | // get host |
| 64 | - $this->settings['host'] = $helper->ask($input, $output, $question); |
|
| 65 | - $output->writeln( " You have just selected: <info>{$this->settings['host']} </info>"); |
|
| 64 | + $this->settings['host'] = $helper->ask($input, $output, $question); |
|
| 65 | + $output->writeln(" You have just selected: <info>{$this->settings['host']} </info>"); |
|
| 66 | 66 | |
| 67 | 67 | $output->writeln(''); |
| 68 | 68 | $helper = $this->getHelper('question'); |
| 69 | 69 | $question = new Question("Enter <info>database name</info>, please : "); |
| 70 | 70 | |
| 71 | 71 | // get name database |
| 72 | - $this->settings['databaseName'] = $helper->ask($input, $output, $question); |
|
| 73 | - $output->writeln( " You have just selected: <info>{$this->settings['databaseName']} </info>"); |
|
| 72 | + $this->settings['databaseName'] = $helper->ask($input, $output, $question); |
|
| 73 | + $output->writeln(" You have just selected: <info>{$this->settings['databaseName']} </info>"); |
|
| 74 | 74 | |
| 75 | 75 | $output->writeln(''); |
| 76 | 76 | $helper = $this->getHelper('question'); |
| 77 | 77 | $question = new Question("Enter <info>database username</info>, please : "); |
| 78 | 78 | |
| 79 | 79 | //get username in database |
| 80 | - $this->settings['databaseUsername'] = $helper->ask($input, $output, $question); |
|
| 81 | - $output->writeln( " You have just selected: <info>{$this->settings['databaseUsername']} </info>"); |
|
| 80 | + $this->settings['databaseUsername'] = $helper->ask($input, $output, $question); |
|
| 81 | + $output->writeln(" You have just selected: <info>{$this->settings['databaseUsername']} </info>"); |
|
| 82 | 82 | |
| 83 | 83 | $output->writeln(''); |
| 84 | 84 | $helper = $this->getHelper('question'); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $question->setHiddenFallback(false); |
| 88 | 88 | |
| 89 | 89 | // get password |
| 90 | - $this->settings['databasePassword'] = $helper->ask($input, $output, $question); |
|
| 90 | + $this->settings['databasePassword'] = $helper->ask($input, $output, $question); |
|
| 91 | 91 | |
| 92 | 92 | |
| 93 | 93 | $table = new Table($output); |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | // connection database |
| 111 | 111 | $capsule = new CapsuleSettings(new Manager()); |
| 112 | - $capsule->settings( $this->settings ); |
|
| 112 | + $capsule->settings($this->settings); |
|
| 113 | 113 | $capsule->checkConnection(); |
| 114 | 114 | |
| 115 | 115 | |
| 116 | - $output->writeln(['','', '<info>Then go ahead!</info>']); |
|
| 116 | + $output->writeln(['', '', '<info>Then go ahead!</info>']); |
|
| 117 | 117 | |
| 118 | 118 | $helper = $this->getHelper('question'); |
| 119 | 119 | $question = new ChoiceQuestion( |
@@ -134,9 +134,9 @@ discard block |
||
| 134 | 134 | $output->writeln('<comment>example EN, RU</comment>'); |
| 135 | 135 | |
| 136 | 136 | // the list of countries that need to migrate |
| 137 | - $this->settings['country'] = $helper->ask($input, $output, $question); |
|
| 138 | - $output->writeln( " You have just selected: <info>{$this->settings['country']} </info>"); |
|
| 139 | - config(['geography.country' => $this->settings['country'] ]); |
|
| 137 | + $this->settings['country'] = $helper->ask($input, $output, $question); |
|
| 138 | + $output->writeln(" You have just selected: <info>{$this->settings['country']} </info>"); |
|
| 139 | + config(['geography.country' => $this->settings['country']]); |
|
| 140 | 140 | |
| 141 | 141 | $io = new SymfonyStyle($input, $output); |
| 142 | 142 | $io->progressStart(3); |
@@ -1,25 +1,25 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - // Your native language |
|
| 5 | - // 0 — Russian, |
|
| 6 | - // 1 — Ukrainian, |
|
| 7 | - // 2 — Belarusian, |
|
| 8 | - // 3 — English, |
|
| 9 | - // 4 — Spanish, |
|
| 10 | - // 5 — Finnish, |
|
| 11 | - // 6 — German, |
|
| 12 | - // 7 — Italian. |
|
| 13 | - 'locale' => 0, |
|
| 4 | + // Your native language |
|
| 5 | + // 0 — Russian, |
|
| 6 | + // 1 — Ukrainian, |
|
| 7 | + // 2 — Belarusian, |
|
| 8 | + // 3 — English, |
|
| 9 | + // 4 — Spanish, |
|
| 10 | + // 5 — Finnish, |
|
| 11 | + // 6 — German, |
|
| 12 | + // 7 — Italian. |
|
| 13 | + 'locale' => 0, |
|
| 14 | 14 | |
| 15 | - // Country you wish to migrate |
|
| 16 | - // standard 3166-1 alpha-2 |
|
| 17 | - // example RU,AU |
|
| 15 | + // Country you wish to migrate |
|
| 16 | + // standard 3166-1 alpha-2 |
|
| 17 | + // example RU,AU |
|
| 18 | 18 | 'country' => 'RU', |
| 19 | 19 | |
| 20 | - 'nameTable' => [ |
|
| 21 | - 'country' => 'country', |
|
| 22 | - 'regions' => 'regions', |
|
| 23 | - 'cities' => 'cities' |
|
| 24 | - ] |
|
| 20 | + 'nameTable' => [ |
|
| 21 | + 'country' => 'country', |
|
| 22 | + 'regions' => 'regions', |
|
| 23 | + 'cities' => 'cities' |
|
| 24 | + ] |
|
| 25 | 25 | ]; |
| 26 | 26 | \ No newline at end of file |