Best way to load belongsTo from owner when ID not present


#1

I am trying to load a model, likedList from the owner of that model, user. In other words, likedList belongs to user. The only problem is, the user model doesn’t have the id of the likedList, instead likedList has the user_id.

What is the best way to load this from the server? A custom endpoint that finds it based on the user_id?


#2

What’s the endpoint to get a likedList?