hasVendor($data->vendor_name)) { return false; } return new Item($data, function ($data) { return [ 'name' => $data->vendor_name, ]; }); } }