I have this orderBy
, but it is not working as it should, for example:
$query = $query->where( 'approved', 1 )
->orderBy('featured',1)
->orderBy('priority',1)
->orderBy('created_at','desc');
I need the priority = 1
column not to overlap the column date created_at
example:
If I have 2 records priority = 1
with date 16/10/2018
and priority = 0
with date 17/10/2018
, I want it to show first with today's date ( 17/10/2018
) even being priority = 0
ie precise show priority = 1
as long as it is with date more current than priority = 0