From 3f83e1bf3dbf05f23b2c6be3e45a68be94d1ef39 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Tue, 20 Jun 2017 15:17:40 -0500 Subject: [PATCH] #16 update scaffolding and remove accidentally committed settings file --- .env.example => .env.dev.example | 1 + .env.travis | 1 + .gitignore | 1 + config/phpvms.php | 32 ------------------- config/settings.php | 4 +-- ...015_08_25_172600_create_settings_table.php | 3 +- storage/settings.json | 1 - 7 files changed, 7 insertions(+), 36 deletions(-) rename .env.example => .env.dev.example (91%) delete mode 100644 storage/settings.json diff --git a/.env.example b/.env.dev.example similarity index 91% rename from .env.example rename to .env.dev.example index 30eb1afe..e90110c7 100644 --- a/.env.example +++ b/.env.dev.example @@ -3,6 +3,7 @@ APP_KEY=base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI= APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://localhost +APP_SETTINGS_STORE=json DB_CONNECTION=local DB_HOST=localhost diff --git a/.env.travis b/.env.travis index af52fe4b..8fe8856e 100644 --- a/.env.travis +++ b/.env.travis @@ -3,6 +3,7 @@ APP_KEY=base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI= APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://localhost +APP_SETTINGS_STORE=json DB_CONNECTION=testing diff --git a/.gitignore b/.gitignore index 976a8223..1ce2cdc4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ app/storage/ public/storage public/hot storage/*.key +storage/settings.json .env.*.php .env.php .env diff --git a/config/phpvms.php b/config/phpvms.php index 24237e08..df9b26a6 100644 --- a/config/phpvms.php +++ b/config/phpvms.php @@ -12,36 +12,4 @@ return [ 'rouble', ], - 'timezones' => [ - '-12' => '(GMT -12:00) Eniwetok, Kwajalein', - '-11' => '(GMT -11:00) Midway Island, Samoa', - '-10' => '(GMT -10:00) Hawaii', - '-9' => '(GMT -9:00) Alaska', - '-8' => '(GMT -8:00) Pacific Time (US & Canada)', - '-7' => '(GMT -7:00) Mountain Time (US & Canada)', - '-6' => '(GMT -6:00) Central Time (US & Canada), Mexico City', - '-5' => '(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima', - '-4' => '(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz', - '-3.5' => '(GMT -3:30) Newfoundland', - '-3' => '(GMT -3:00) Brazil, Buenos Aires, Georgetown', - '-2' => '(GMT -2:00) Mid-Atlantic', - '-1' => '(GMT -1:00) Azores, Cape Verde Islands', - '0' => '(GMT) Western Europe Time, London, Lisbon, Casablanca', - '1' => '(GMT +1:00) Brussels, Copenhagen, Madrid, Paris', - '2' => '(GMT +2:00) Kaliningrad, South Africa', - '3' => '(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg', - '3.5' => '(GMT +3:30) Tehran', - '4' => '(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi', - '4.5' => '(GMT +4:30) Kabul', - '5' => '(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent', - '5.5' => '(GMT +5:30) Bombay, Calcutta, Madras, New Delhi', - '6' => '(GMT +6:00) Almaty, Dhaka, Colombo', - '7' => '(GMT +7:00) Bangkok, Hanoi, Jakarta', - '8' => '(GMT +8:00) Beijing, Perth, Singapore, Hong Kong', - '9' => '(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk', - '9.5' => '(GMT +9:30) Adelaide, Darwin', - '10' => '(GMT +10:00) Eastern Australia, Guam, Vladivostok', - '11' => '(GMT +11:00) Magadan, Solomon Islands, New Caledonia', - '12' => '(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka' - ], ]; diff --git a/config/settings.php b/config/settings.php index 7fea2de2..5a778820 100644 --- a/config/settings.php +++ b/config/settings.php @@ -2,7 +2,7 @@ return array( // which type of store to use. // valid options: 'json', 'database' - 'store' => 'json', + 'store' => env('APP_SETTINGS_STORE', 'database'), // if the json store is used, give the full path to the .json file // that the store writes to. @@ -15,7 +15,7 @@ return array( // set to null, the default connection will be used. 'connection' => null, - // If you want to use custom column names in database store you could + // If you want to use custom column names in database store you could // set them in this configuration 'keyColumn' => 'key', 'valueColumn' => 'value' diff --git a/database/migrations/2015_08_25_172600_create_settings_table.php b/database/migrations/2015_08_25_172600_create_settings_table.php index 2c544f54..c8ffee77 100644 --- a/database/migrations/2015_08_25_172600_create_settings_table.php +++ b/database/migrations/2015_08_25_172600_create_settings_table.php @@ -26,9 +26,10 @@ class CreateSettingsTable extends Migration $table->increments('id'); $table->string($this->keyColumn)->index(); $table->text($this->valueColumn); + $table->timestamps(); }); - Setting::set('timezone', '0'); + Setting::set('timezone', 'UTC'); Setting::set('currency', 'dollar'); Setting::save(); } diff --git a/storage/settings.json b/storage/settings.json deleted file mode 100644 index 9f5dd4e3..00000000 --- a/storage/settings.json +++ /dev/null @@ -1 +0,0 @@ -{"foo":"bar"} \ No newline at end of file