@php
use App\Models\SellerStore;
use App\Services\StoreService;
use App\Services\SettingService;
$store_id = app(StoreService::class)->getStoreId();
$sellers = SellerStore::with(['seller', 'user:id,username'])
->where('store_id', $store_id)
->get()
->map(function ($seller) {
return [
...$seller->toArray(),
...$seller->seller ? $seller->seller->toArray() : [],
'username' => $seller->user?->username,
];
});
$settings = app(SettingService::class)->getSettings('system_settings', true);
$settings = json_decode($settings, true);
$app_name =
isset($settings['app_name']) && !empty($settings['app_name']) ? $settings['app_name'] : 'Eshop Plus';
@endphp