Added default OS and currency to settings
Added default OS and currency to settings
This commit is contained in:
parent
07d90e1b8a
commit
a7d0e07723
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->string('default_currency')->default('USD');
|
||||
$table->integer('default_server_os')->default(20);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user