filters ok
This commit is contained in:
1 parent
8e9bb0eacb
commit
98d92b2ee3
16 files changed
+365
-189
No files matched your search
@@ -11,14 +11,29 @@ class LoadPartnerDifferences
|
||||
public static function load()
|
||||
{
|
||||
$fields = OddsTable::fields();
|
||||
|
||||
$event_ids = [];
|
||||
foreach (EventsTable::$bettype_settings as $table) {
|
||||
$books = DB::table($table)
|
||||
->where('bookmaker_id', auth()->user()->bookmaker_id)
|
||||
->get();
|
||||
$partners = DB::table($table)
|
||||
->where('bookmaker_id', auth()->user()->partner_bookmaker_id)
|
||||
->get();
|
||||
|
||||
$has_active_spread = OddsTable::where('name', $table)->value('has_active_spread');
|
||||
|
||||
if ($has_active_spread) {
|
||||
$books = DB::table($table)
|
||||
->where('bookmaker_id', auth()->user()->bookmaker_id)
|
||||
->where('active_spread', 1)
|
||||
->get();
|
||||
$partners = DB::table($table)
|
||||
->where('bookmaker_id', auth()->user()->partner_bookmaker_id)
|
||||
->where('active_spread', 1)
|
||||
->get();
|
||||
} else {
|
||||
$books = DB::table($table)
|
||||
->where('bookmaker_id', auth()->user()->bookmaker_id)
|
||||
->get();
|
||||
$partners = DB::table($table)
|
||||
->where('bookmaker_id', auth()->user()->partner_bookmaker_id)
|
||||
->get();
|
||||
}
|
||||
|
||||
foreach ($books as $book) {
|
||||
$row1 = get_object_vars($book);
|
||||
|
||||
Reference in new issue
Block a user