Level 56
Try using ->whereDoesntHave()
$billList = Bill::with('company');
->where('company_id', $this->payBill->company->id)
->where('comp_id', $this->payBill->comp->id)
->where('status', 2) //Verified
->whereNull('paid_by')
->whereDoesntHave('payBills') // <<< TRY THIS
->when($this->search, function ($query) {
$query->where('name', 'like', '%' . $this->search . '%');
})
->orderBy('id')
->paginate(10);
reference: https://laravel.com/docs/9.x/eloquent-relationships#querying-relationship-absence