i found some syntax error using where function in query (laravel)

i have two condition which i want to implement in a query but when i used i found some systax error but i did not how to solved it. error in the below:

syntax error, unexpected '}'

and my controller code is :

public function paymentHubList(Request $request, $id){
$Abc = new Abc();

$Abc = $Abc->where('status_id','1')->where('payment','1')
->where(function($query){
$query->where(function($query){
$query->where('delivery',$id)->where('paid','!=','0');
})
->orWhere(function($query){
$query->where('branch',$id)->where('paid', '0');
})
})

->orderBy('id','desc')->paginate(100);
dd($Abc);

}

in the where function i want to execute a and or condition. in the below i gave the condition:

@if((($Abc->delivery == $id) && ($Abc->paid != '0')) || ($Abc->branch == $id) && ($Abc->paid == '0'))


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2VXmrNb
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery