@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,
];
});
@endphp