My first table is product and second table is user
In product table column is id, user_id,prname etc;
In user table column is id, user_name, rating.
I used this for get
$user = new User();
$user ->get();
$products = new Product();
$products ->get();
Now I want to get products order by user rating