samedi 7 juillet 2018

Return only posts with more on 5 reputation of comment in collection

I has $posts collection instance and i wont to get only that posts which has comments and latest one comments has more 5 reputation. My collection instance similar this

[
    'id' => 1,
    'title' => 'Some title',
    'comments' => [
        [
            'id' => 1,
            'content' => 'some content',
            'reputation' => 5
        ],
        [
            'id' => 2,
            'content' => 'some content',
            'reputation' => 6
        ],
        ...
    ]
]



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire