I saw this question in StackOverflow, but I could not answer it because it was mistakenly marked as duplicate. However $user->posts is not the same as Posts::all(). So if you have User and Post, how do you sort the posts?
相关问题
- How to execute MYSQL query in laravel?
- Tell hibernate hbm2ddl not create individual table
- Quickest method for matching nested XML data again
- How can I add condition on mail notification larav
- Sequelize where on many-to-many join
Ya, answering my own question just to help out.