mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: config save
This commit is contained in:
parent
304e67a632
commit
6b978c421a
@ -45,11 +45,5 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$users = User::all();
|
||||
foreach ($users as $user) {
|
||||
$user->token = Helper::guid();
|
||||
$user->uuid = Helper::guid(true);
|
||||
$user->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -173,11 +173,11 @@ class ConfigController extends Controller
|
||||
$data = $request->validated();
|
||||
$config = config('v2board');
|
||||
foreach (ConfigSave::RULES as $k => $v) {
|
||||
if (!in_array($k, array_keys(ConfigSave::RULES)) || !isset($data[$k])) {
|
||||
if (!in_array($k, array_keys(ConfigSave::RULES))) {
|
||||
unset($config[$k]);
|
||||
continue;
|
||||
}
|
||||
if (isset($data[$k])) {
|
||||
if (isset($data[$k]) && !is_null($data[$k])) {
|
||||
$config[$k] = $data[$k];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user