@php
use \App\Models\Category ;
use \App\Models\Order ;
if($row->date!='' || $row->day!='' )
$otherOrders = Order::where('user_id' , $row->user_id)
->where('id' , '!=' , $row->id)
->when($row->day=='' , function($q) use($row){
$q->where('date' , $row->date);
})
->when($row->day!='' , function($q) use($row){
$q->where('day' , $row->day)
->whereYear('created_at' , date('Y'));
})
->active()
->count();
@endphp
@if($row->notes !='')
@endif
@if($row->restaurant_id !='')
@endif
@if($row->shipping_method_id==2)
@endif
@if($row->status==5)
@endif
@if($row->category_id == Category::ID_OF['gift'] && $row->userAddress &&
$row->userAddress->address =='' && $row->userAddress->lat =='' )
@endif
@if(@$row->user->is_vip==1 )
VIP
@endif
@if(isset($otherOrders) && $otherOrders>0 )
+{{$otherOrders}}
@endif
@php
$deers = Category::where('parent_id' , 212)->get()->pluckToArray('id');
$category_ids = $row->products->pluckToArray('category_id') ;
@endphp
@if(!empty(array_intersect($category_ids,$deers)) )
@endif
@if($row->notConfirmedPayment())
يرجى التحقق من العملية
@endif