File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -452,21 +452,15 @@ public function omit($boolean = true)
452452
453453 $ count = sizeof ($ this ->wheres );
454454 if ($ count == 0 ) {
455- $ currentFind = collect ([]);
455+ $ currentFind = [];
456+ $ count = 1 ;
456457 } else {
457458 $ currentFind = $ this ->wheres [sizeof ($ this ->wheres ) - 1 ];
458459 }
459460
460- if ($ boolean = false ) {
461- // the user is removing an omit which was already set
462- $ currentFind ->forget ('omit ' );
463- } else {
464- // add the omit flag to the current find request
465- // we have to set it to the word 'true'
466- $ currentFind ->put ('omit ' , 'true ' );
467- }
461+ $ currentFind ['omit ' ] = $ boolean ? 'true ' : 'false ' ;
468462
469- $ this ->wheres [$ count ] = $ currentFind ;
463+ $ this ->wheres [$ count - 1 ] = $ currentFind ;
470464
471465 return $ this ;
472466 }
You can’t perform that action at this time.
0 commit comments