added kashkool 3
This commit is contained in:
@@ -160,7 +160,6 @@ class ReportController extends Controller
|
||||
'price_last' => 0,
|
||||
'price' => 0,
|
||||
'main_product' => 0,
|
||||
'taban_gohar' => 0,
|
||||
'montzar' => 0,
|
||||
'zaarbox' => 0,
|
||||
'closed' => true,
|
||||
@@ -365,7 +364,6 @@ class ReportController extends Controller
|
||||
'price_last' => 0,
|
||||
'price' => 0,
|
||||
'main_product' => $pr_price ?? 0,
|
||||
'taban_gohar' => 0,
|
||||
'montzar' => $montzar_price ?? 0,
|
||||
'zaarbox' => $zaarbox_price ?? 0,
|
||||
'closed' => true,
|
||||
@@ -383,7 +381,6 @@ class ReportController extends Controller
|
||||
'price_last' => 0,
|
||||
'price' => 0,
|
||||
'main_product' => $pr_price ?? 0,
|
||||
'taban_gohar' => 0,
|
||||
'montzar' => $montzar_price ?? 0,
|
||||
'zaarbox' => $zaarbox_price ?? 0,
|
||||
'closed' => true,
|
||||
@@ -495,7 +492,6 @@ class ReportController extends Controller
|
||||
'price_last' => $priceLast,
|
||||
'price' => $priceValue,
|
||||
'main_product' => $pr_price ?? 0,
|
||||
'taban_gohar' => 0,
|
||||
'montzar' => $montzar_price ?? 0,
|
||||
'zaarbox' => $zaarbox_price ?? 0,
|
||||
'closed' => false,
|
||||
|
||||
@@ -22,10 +22,14 @@ class ConfigService
|
||||
*/
|
||||
public function get(string $key, $default = null)
|
||||
{
|
||||
$row = Setting::where('key', $key)->first();
|
||||
try {
|
||||
$row = Setting::where('key', $key)->first();
|
||||
|
||||
if ($row !== null && $row->is_active && $row->value !== null && $row->value !== '') {
|
||||
return $row->value;
|
||||
if ($row !== null && $row->is_active && $row->value !== null && $row->value !== '') {
|
||||
return $row->value;
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// DB در دسترس نیست (deploy / .env اشتباه) — از config/price_providers.php استفاده شود
|
||||
}
|
||||
|
||||
$fromFile = config("price_providers.{$key}");
|
||||
|
||||
Reference in New Issue
Block a user