Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function scopeByInStore($query)
- {
- $inStoreOrderType = GiftCardOrderTypes::$inStore;
- $id = GiftCardBatch::where('name', '=', $inStoreOrderType)->first()->id;
- $inStoreGiftCardIds = GiftCard::where('gift_card_batch_id', '=', $id)
- ->lists('id');
- return $query->whereIn('gift_card_id', $inStoreGiftCardIds);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement