Laravel Collection Public API: diff
The diff method is used to find the items in the collection that are not present in another collection. It returns a new Collection instance. You can pass either an array or another Collection instance as the argument. Here are some examples of how to use diff with arrays and Collection instances.