refactor: do not catch exceptions when cannot read options
This commit is contained in:
parent
d70b39f445
commit
9aa867e8aa
|
|
@ -20,13 +20,9 @@ class Option
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->items = DB::table('options')
|
||||
->get()
|
||||
->mapWithKeys(fn ($item) => [$item->option_name => $item->option_value]);
|
||||
} catch (QueryException $e) {
|
||||
$this->items = collect();
|
||||
}
|
||||
$this->items = DB::table('options')
|
||||
->get()
|
||||
->mapWithKeys(fn ($item) => [$item->option_name => $item->option_value]);
|
||||
}
|
||||
|
||||
public function get($key, $default = null, $raw = false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user