Replies: 2 comments
-
Actually, same behavior is seen with |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
11.15.0
PHP Version
8.2.20
Database Driver & Version
No response
Description
Executing
SomeModel::all()->random(3)->pluck('id')
will return 3 IDs.Executing
SomeModel::all()->random(1)->pluck('id')
will return 1 IDBut, executing
SomeModel::all()->random()->pluck('id')
will return all the IDs even thoughSomeModel::all()->random()
returns a single modelSteps To Reproduce
Just execute
SomeModel::all()->random()->pluck('id')
. I would expect to get a single ID.Beta Was this translation helpful? Give feedback.
All reactions