Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

adonis js order by two columns

Database
    .from('users')
    .orderBy([
      	{
        	column: 'username',
	        order: 'asc',
    	},
      	{
        	column: 'created_at',
	        order: 'desc',
    	}
	])
Source by docs.adonisjs.com #
 
PREVIOUS NEXT
Tagged: #adonis #js #order #columns
ADD COMMENT
Topic
Name
2+7 =