@@ -26,16 +26,16 @@ |
||
| 26 | 26 | /* |
| 27 | 27 | * For security reason we have limit the upload file formats bellow |
| 28 | 28 | */ |
| 29 | - 'UPLOAD_FILE_EXTENSION_ALLOWED' => ['jpg','jpeg','png','gif','pdf','xls','xlsx','doc','docx','txt','zip','rar','rtf'], |
|
| 29 | + 'UPLOAD_FILE_EXTENSION_ALLOWED' => ['jpg', 'jpeg', 'png', 'gif', 'pdf', 'xls', 'xlsx', 'doc', 'docx', 'txt', 'zip', 'rar', 'rtf'], |
|
| 30 | 30 | |
| 31 | - 'UPLOAD_IMAGE_EXTENSION_ALLOWED' => ['jpg','jpeg','png','gif'], |
|
| 31 | + 'UPLOAD_IMAGE_EXTENSION_ALLOWED' => ['jpg', 'jpeg', 'png', 'gif'], |
|
| 32 | 32 | |
| 33 | 33 | /* |
| 34 | 34 | * Data Migration table additional |
| 35 | 35 | * You can define in this array what the tables you want to include in "php artisan crudbooster:data_migration" |
| 36 | 36 | * The default is all cb_ prefix will be include in data migration |
| 37 | 37 | */ |
| 38 | - 'ADDITIONAL_DATA_MIGRATION'=>['users','migrations'], |
|
| 38 | + 'ADDITIONAL_DATA_MIGRATION'=>['users', 'migrations'], |
|
| 39 | 39 | |
| 40 | 40 | /* |
| 41 | 41 | * Google FCM Server Key is used to send a notification via FireBase cloud message |
@@ -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 | |
@@ -82,7 +82,7 @@ |
||
| 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 | |