diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index c4699a8..8a26408 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -91,6 +91,14 @@ class HomeController extends Controller Session::put('timer_version_footer', $settings[0]->show_versions_footer); Session::put('show_servers_public', $settings[0]->show_servers_public); + Session::put('show_server_value_ip', $settings[0]->show_server_value_ip); + Session::put('show_server_value_hostname', $settings[0]->show_server_value_hostname); + Session::put('show_server_value_price', $settings[0]->show_server_value_price); + Session::put('show_server_value_yabs', $settings[0]->show_server_value_yabs); + Session::put('show_server_value_provider', $settings[0]->show_server_value_provider); + Session::put('show_server_value_location', $settings[0]->show_server_value_location); + Session::put('default_currency', $settings[0]->default_currency); + Session::put('default_server_os', $settings[0]->default_server_os); Session::save(); $pricing = json_decode(DB::table('pricings')->get(), true); diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 3d73bbd..892caa8 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -28,7 +28,9 @@ class SettingsController extends Controller 'show_server_value_provider' => 'required|boolean', 'show_server_value_location' => 'required|boolean', 'show_server_value_price' => 'required|boolean', - 'show_server_value_yabs' => 'required|boolean' + 'show_server_value_yabs' => 'required|boolean', + 'default_currency' => 'required', + 'default_server_os' => 'required' ]); DB::table('settings') @@ -41,7 +43,9 @@ class SettingsController extends Controller 'show_server_value_provider' => $request->show_server_value_provider, 'show_server_value_location' => $request->show_server_value_location, 'show_server_value_price' => $request->show_server_value_price, - 'show_server_value_yabs' => $request->show_server_value_yabs + 'show_server_value_yabs' => $request->show_server_value_yabs, + 'default_currency' => $request->default_currency, + 'default_server_os' => $request->default_server_os ]); Session::put('timer_version_footer', $request->show_versions_footer); @@ -52,6 +56,8 @@ class SettingsController extends Controller Session::put('show_server_value_yabs', $request->show_server_value_yabs); Session::put('show_server_value_provider', $request->show_server_value_provider); Session::put('show_server_value_location', $request->show_server_value_location); + Session::put('default_currency', $request->default_currency); + Session::put('default_server_os', $request->default_server_os); Session::save(); Cache::forget('settings');//Main page settings cache diff --git a/database/migrations/2022_03_05_125635_add_cols_to_settings.php b/database/migrations/2022_03_05_125635_add_cols_to_settings.php new file mode 100644 index 0000000..3d746a5 --- /dev/null +++ b/database/migrations/2022_03_05_125635_add_cols_to_settings.php @@ -0,0 +1,30 @@ +string('default_currency')->default('USD'); + $table->integer('default_server_os')->default(20); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +};