mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
11 lines
No EOL
512 B
Markdown
11 lines
No EOL
512 B
Markdown
---
|
|
title: 'You can get all primary keys from an Eloquent Collection using the modelKeys() method'
|
|
tweet_id: '1517561129215483907'
|
|
thread_slug: weekly-thread-2022-16
|
|
author_username: SteveTheBauman
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FQZb4jlWUA0WBWz.jpg'
|
|
created_at: 2022-04-22T17:49:02+00:00
|
|
slug: 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 👌 |