Laravel Eager with Where约束

I have 2 methods with eager loading and paginate. but problem is that i have to use where constraint too and i am getting offset 0 error.

public function showAllOrders(){
    $orders = \admin\Order::with('orderfiles','paymentStatus','orderStatus','orderDelivery','flexibleDelivery')->paginate(20);
        return View('admin.all_orders')
            ->with('orders',$orders);
}

public function showAllPaidOrders(){
    $orders = \admin\Order::with(array('orderfiles','orderStatus','orderDelivery','flexibleDelivery','paymentStatus'=>function($query){
        $query->where('status', '=', 'Paid');
    }))->paginate(20);
        return View('admin.all_orders')
            ->with('orders',$orders);
}

showAllOrders working fine but when i am using where constraint with showAllPaidOrders i am getting offset error....

1/2 ErrorException in Collection.php line 837: Undefined offset: 0 2/2 ErrorException in Collection.php line 837: Undefined offset: 0 (View: E:\content\xampp\htdocs\l5esources\views\admin\all_orders.blade.php)

Even if both blade views are same. The only difference is the "Where Constraint"

i solved this with using wherehas function

public function showAllOrdersbySite($domain_id){
    $orders = Order::whereHas('paymentStatus', function ($query) use($domain_id) {
        $query->where("domain_id","=",$domain_id);

    })->orderby('tbl_orders.created_at', 'desc')->paginate(20);
        return View('admin.all_orders')
            ->with('orders',$orders);
}

and even if you want to check multiples relation you can add whereHas again and again as per as your requirement.