Laravel Collection Public API: except
The except method in Laravel returns key/value pairs from a collection that are *not* in the specified keys array. You can use it to exclude sensitive data like passwords. By combining it with the toJson method, you can convert the resulting data to JSON format. This allows you to easily remove sensitive information before sending it to an end user.