Get the ids of a collection of models
– twitter.com
TIL that there's a shorthand for the dreaded pluck('id')->toArray() combo in #Laravel:$user->posts->modelKeys() will return all related post IDs that are attached to the user model! 🔥https://t.co/imIPlVNjwi
— Alex (@AlexVanderbist) 19 november 2019
S/O to @rubenvanassche for telling me this existed 👌 pic.twitter.com/c3sANn52M8
Read more [twitter.com]