@Prez Thanks for the response, but I already know how to do it. What I want to know is how to distinguish routes. As in, how would a route differ from returning Users::all() and Users::with('posts')->all(); Seemingly both would be '/user' (with route named something like 'user.index'). The thing is, I don't want to always pass the relationships to the user for security reasons (or if they just don't need the data). And I don't want to have to pass a flag or value that says get the posts relationship, or get the permissions relationship. So i was wondering if there was a restful way to do this.
I know I could distinguish what data i pass by prefixing the route with the usertype (for example /admin/user vs /client/user or /subscriber/user). These could all return only the relationships relevant to them. However, I was wondering if there was a way that you could take care of it in routes such as requesting /user/id/post/id/user or if that was bad form.