vmangos
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Services;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Throwable;
|
||||
|
||||
class StoreAvailabilityService
|
||||
{
|
||||
@@ -10,10 +11,16 @@ class StoreAvailabilityService
|
||||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return (bool) DB::connection('store')
|
||||
->table('store_config')
|
||||
->where('id', self::CONFIG_ID)
|
||||
->value('enabled');
|
||||
try {
|
||||
return (bool) DB::connection('store')
|
||||
->table('store_config')
|
||||
->where('id', self::CONFIG_ID)
|
||||
->value('enabled');
|
||||
} catch (Throwable $exception) {
|
||||
report($exception);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function setEnabled(bool $enabled): void
|
||||
|
||||
Reference in New Issue
Block a user