-Add new setting "Delete shift"
-Move "Shift" frontend to V1 module
This commit is contained in:
miroman-afk
2022-02-01 01:55:15 +03:00
parent 57949aa89a
commit 5497b611ef
29 changed files with 1359 additions and 3 deletions

36
commands/GETSettings.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
namespace App\Commands;
use App\Component\Models\Settings;
use App\Console\Commands\HRCCommand;
use App\Console\Commands\HRCCommandInterface;
class GETSettings extends HRCCommand implements HRCCommandInterface {
protected $signature = 'getsettings';
public function command($input, $output = null) {
if (isset($input['code'])) {
$setting = Settings::where('code', $input['code'])->first();
if ($setting) {
return [
'status' => 'success',
'name' => $setting['name'],
'code' => $setting['code'],
'value' => $setting['value'],
];
} else {
return [
'status' => 'error',
'more' => 'Setting not found',
];
}
} else {
$settings = Settings::all();
return [
'status' => 'success',
'settings' => $settings,
];
}
}
}