Skip to content
Advertisement

I want to get ranking number in Laravel

I want to get ranking number in Laravel.

DB is here.

JavaScript

I want to get ranking number in point column. What should I do?

now code is this.

JavaScript

if I have these datas.

JavaScript

I want to get ranking number ex) id 1 => 2 (or3) ex) id 3 => 1

Advertisement

Answer

You can get the rank as below:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement