04 - Example 3: pluck + flatten
We found 5 results for "pluck".
In this short tutorial, we will see three examples of the Collections method pluck(). I think it is rarely used and should be used more often.
There are situations where you need to get array of IDs for some records in collection/table. I will show you two quick ways to do it - one is pretty popular, and another is a function which I found out only today.
Files in the example:
Files in the example: