@@ -32,7 +32,7 @@ |
||
32 | 32 | public function handle() |
33 | 33 | { |
34 | 34 | $this->info("== Data Migrate =="); |
35 | - $this->call("db:seed",["--class"=>"CbMigrationSeeder"]); |
|
35 | + $this->call("db:seed", ["--class"=>"CbMigrationSeeder"]); |
|
36 | 36 | $this->info("== Data Migrate Finished =="); |
37 | 37 | } |
38 | 38 | } |
@@ -41,18 +41,18 @@ discard block |
||
41 | 41 | $php_string = ""; |
42 | 42 | $additional_tables = cbConfig("ADDITIONAL_DATA_MIGRATION"); |
43 | 43 | |
44 | - foreach($tables as $table) { |
|
45 | - if(substr($table,0,3) == "cb_" || in_array($table, $additional_tables)) { |
|
44 | + foreach ($tables as $table) { |
|
45 | + if (substr($table, 0, 3) == "cb_" || in_array($table, $additional_tables)) { |
|
46 | 46 | $this->info("Create seeder for table : ".$table); |
47 | 47 | $rows = DB::table($table)->get(); |
48 | 48 | $data = []; |
49 | - foreach($rows as $i=>$row) { |
|
49 | + foreach ($rows as $i=>$row) { |
|
50 | 50 | $data[$i] = []; |
51 | - foreach($row as $key=>$val) { |
|
51 | + foreach ($row as $key=>$val) { |
|
52 | 52 | $data[$i][$key] = $val; |
53 | 53 | } |
54 | 54 | } |
55 | - if(count($data)!=0) { |
|
55 | + if (count($data) != 0) { |
|
56 | 56 | $php_string .= 'DB::table(\''.$table.'\')->delete();'."\n\t\t\t"; |
57 | 57 | $php_string .= 'DB::table(\''.$table.'\')->insert('.min_var_export($data).');'."\n\t\t\t"; |
58 | 58 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $composer_path = ''; |
83 | 83 | if (file_exists(getcwd().'/composer.phar')) { |
84 | 84 | $composer_path = '"'.PHP_BINARY.'" '.getcwd().'/composer.phar'; |
85 | - }else{ |
|
85 | + } else { |
|
86 | 86 | $composer_path = 'composer'; |
87 | 87 | } |
88 | 88 |