1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/you-can-get-all-primary-keys-from-an-eloquent-collection-using-the-modelkeys-method.md
2022-04-25 13:00:16 +02:00

512 B

title tweet_id thread_slug author_username images created_at slug
You can get all primary keys from an Eloquent Collection using the modelKeys() method 1517561129215483907 weekly-thread-2022-16 SteveTheBauman
https://pbs.twimg.com/media/FQZb4jlWUA0WBWz.jpg
2022-04-22T17:49:02+00:00 you-can-get-all-primary-keys-from-an-eloquent-collection-using-the-modelkeys-method

Always forget about the modelKeys method on Eloquent Collections for getting the ID's from a collection of models 👌