This commit is contained in:
2026-10-03 14:33:08 +04:00
parent 6a73d760c4
commit 93a9442e1c
67 changed files with 941 additions and 698 deletions
+11 -4
View File
@@ -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