The
Read more in the official Laravel docs.
filter method filters the collection using the given callback, keeping only those items that pass a given truth test.Read more in the official Laravel docs.