Skip to content

How to orderBy #117

@hoangbk009

Description

@hoangbk009

i want orderBy topic_id or created_at DESC
defaul index is ASC

$query = Comment::where('topic_id', $topicId)
            ->where('created_at', '>=', 0)
->orderBy($conditions['orderBy']);

screen shot 2018-01-02 at 15 31 37

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions