I am trying to get all articles which have 'approved' value in status column. Here is the code:
$articles = Article::where('status', 'approved')->orderBy('published_at', 'desc')->get();
But I am getting all data. where clause is not working! Is there anything wrong with the Syntax?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire