Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to orderBy #117

Closed
hoangbk009 opened this issue Jan 2, 2018 · 6 comments
Closed

How to orderBy #117

hoangbk009 opened this issue Jan 2, 2018 · 6 comments

Comments

@hoangbk009
Copy link

hoangbk009 commented Jan 2, 2018

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

@hoangbk009
Copy link
Author

use it, oke? where to insert?

$query['ScanIndexForward'] = strtolower($this->orderBy) == 'desc' ? false : true;

@baopham
Copy link
Owner

baopham commented Jan 2, 2018

Specifying the order is not yet supported. Let me see what can be done.

@hoangbk009
Copy link
Author

Specifying the order is not yet supported. Let me see what can be done.

I wait for your feedback.

@baopham
Copy link
Owner

baopham commented Jan 3, 2018

I won't have time until this weekend unfortunately

@baopham
Copy link
Owner

baopham commented Jan 6, 2018

Please try version 4.2.0 and follow the instruction here

@sobwoofer
Copy link

@baopham 4.2.0 ? but 4.1.2 is latest version for today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants