lundi 30 avril 2018

How to use where and skip in same condition for Laravel queries ?

I have a news website and in a partial i must skip first 5 headline articles and fetch others.

There are 2 parts on my page. One is slider ( for headline posts ) and second is for other posts ( non-headline articles and headline articles after last 5 )

My query is not working. I think i need two conditions on my where query. skip where is headline and last 5 posts..

This query does not work :

 ->where('headline', '=', '1')->skip(5)

How can i achieve this ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire