fix some db-handling errors
This commit is contained in:
parent
ac190ecd17
commit
b245a54eee
4 changed files with 14 additions and 6 deletions
|
@ -35,7 +35,11 @@ class Invoices
|
|||
];
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
Settings::where('key', $key)->update(['value' => $request->get($value)]);
|
||||
$param = $request->get($value);
|
||||
if (!$param) {
|
||||
$param = "";
|
||||
}
|
||||
Settings::where('key', $key)->update(['value' => $param]);
|
||||
Cache::forget("setting" . ':' . $key);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,13 @@ class Language
|
|||
"SETTINGS::LOCALE:DATATABLES" => "datatable-language"
|
||||
];
|
||||
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
Settings::where('key', $key)->update(['value' => $request->get($value)]);
|
||||
$param = $request->get($value);
|
||||
if (!$param) {
|
||||
$param = "false";
|
||||
}
|
||||
Settings::where('key', $key)->update(['value' => $param]);
|
||||
Cache::forget("setting" . ':' . $key);
|
||||
Session::remove("locale");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
@inject('Invoices', 'App\Classes\Settings\Invoices')
|
||||
@inject('Settings', 'App\Models\Settings')
|
||||
|
||||
<div class="tab-pane mt-3" id="invoice">
|
||||
<div class="tab-pane mt-3" id="invoices">
|
||||
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
||||
action="{{ route('admin.settings.update.invoicesettings') }}">
|
||||
@csrf
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<!-- AUTO TRANSLATE -->
|
||||
<div class="form-group">
|
||||
<input value="true" id="autotranslate" name="autotranslate"
|
||||
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DYNAMIC")?"checked":"")}}
|
||||
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DYNAMIC")=="true"?"checked":"")}}
|
||||
type="checkbox">
|
||||
<label for="autotranslate">{{__('Auto-translate')}} <i data-toggle="popover"
|
||||
data-trigger="hover"
|
||||
|
@ -66,7 +66,7 @@
|
|||
|
||||
<!-- CLIENTS CAN CHANGE -->
|
||||
<input value="true" id="canClientChangeLanguage" name="canClientChangeLanguage"
|
||||
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:CLIENTS_CAN_CHANGE")?"checked":"")}}
|
||||
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:CLIENTS_CAN_CHANGE")=="true"?"checked":"")}}
|
||||
type="checkbox">
|
||||
<label for="canClientChangeLanguage">{{__('Let the Client change the Language')}} <i
|
||||
data-toggle="popover"
|
||||
|
|
Loading…
Add table
Reference in a new issue