I write one query which will return true or false by using exists() function in laravel like this
$a=$item->conditions()->exists();
The above query works fine ,now i want to extend the query with where
condition that will check weather the status column should equal to the active
for that i am writing the following code but it's throwing an error like Call to a member function where() on boolean
,please help me to extend the query for writing a where condition.
$a=$item->conditions()->exists()->where('status','=','active');
Note:- conditions() -->returns an ID from the model