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