How to query multiple records through ID by Laravel Eloquent
Editor to share with you Laravel Eloquent how to query multiple records through ID, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Query multiple records through ID
Everyone knows the find () method, right?
$user = User::find (1)
I am surprised that few people know that this method can accept an array of multiple ID as parameters:
$users = User::find ([1pr 2je 3]); the above is all the contents of the article "how Laravel Eloquent queries multiple records through ID". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!