I have a query that gets the officiants credentials, although that can return many rows if the user has any.
I am trying to get a query where IF one of the rows renew
column is set to 1
then ignore it, else, return the results if its still 0
$officiants = Officiant::where('status', 1)
->whereHas('cred',function($q) {
$q->where('renewal', 0);
})
->get();
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2rcNbpS
via IFTTT
Aucun commentaire:
Enregistrer un commentaire