PHPackages                             rickkuilman/digital-humani-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rickkuilman/digital-humani-php-sdk

ActiveLibrary

rickkuilman/digital-humani-php-sdk
==================================

PHP SDK for DigitalHumani's RaaS (Reforestation-as-a-Service)

v2.0.0(4y ago)61181MITPHPPHP ^7.4|^8.0

Since Aug 8Pushed 3y ago2 watchersCompare

[ Source](https://github.com/rickkuilman/digital-humani-php-sdk)[ Packagist](https://packagist.org/packages/rickkuilman/digital-humani-php-sdk)[ Docs](https://github.com/rickkuilman/digital-humani-php-sdk)[ RSS](/packages/rickkuilman-digital-humani-php-sdk/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (4)Versions (7)Used By (0)

🌳 Digital Humani - PHP SDK
==========================

[](#-digital-humani---php-sdk)

[![Test status](https://github.com/rickkuilman/digital-humani-php-sdk/actions/workflows/main.yml/badge.svg)](https://github.com/rickkuilman/digital-humani-php-sdk/actions) [![Latest Stable Version](https://camo.githubusercontent.com/207ff0f34ebe4cadbf0139f6104fb50b164941740cdacf07d1343bfaf54655f4/687474703a2f2f706f7365722e707567782e6f72672f7269636b6b75696c6d616e2f6469676974616c2d68756d616e692d7068702d73646b2f76)](https://packagist.org/packages/rickkuilman/digital-humani-php-sdk) [![Total Downloads](https://camo.githubusercontent.com/8ae2630b79881959e7e00b14721efcca23c96603d92de5fc0bc86d80b1fbf914/687474703a2f2f706f7365722e707567782e6f72672f7269636b6b75696c6d616e2f6469676974616c2d68756d616e692d7068702d73646b2f646f776e6c6f616473)](https://packagist.org/packages/rickkuilman/digital-humani-php-sdk) [![Latest Unstable Version](https://camo.githubusercontent.com/0e146469928075a3607f4f849baacf50cb63cdcb8d0cb5fbf92da1788455448b/687474703a2f2f706f7365722e707567782e6f72672f7269636b6b75696c6d616e2f6469676974616c2d68756d616e692d7068702d73646b2f762f756e737461626c65)](https://packagist.org/packages/rickkuilman/digital-humani-php-sdk) [![License](https://camo.githubusercontent.com/33538cc1ea003c6b145b8040158835fdd8fa1182cf6e25f0d9911004ba5eed8e/687474703a2f2f706f7365722e707567782e6f72672f7269636b6b75696c6d616e2f6469676974616c2d68756d616e692d7068702d73646b2f6c6963656e7365)](https://packagist.org/packages/rickkuilman/digital-humani-php-sdk) [![PHP Version Require](https://camo.githubusercontent.com/2e45c7bd7229ca156b9fa1d566f4658c6b67dcf707038ec02e89a1844645b28b/687474703a2f2f706f7365722e707567782e6f72672f7269636b6b75696c6d616e2f6469676974616c2d68756d616e692d7068702d73646b2f726571756972652f706870)](https://packagist.org/packages/rickkuilman/digital-humani-php-sdk)

Unofficial PHP SDK for DigitalHumani's RaaS (Reforestation-as-a-Service)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rickkuilman/digital-humani-php-sdk
```

Preparation
-----------

[](#preparation)

- Create a [sandbox](https://my.sandbox.digitalhumani.com/register)or [production](https://my.digitalhumani.com/register) account on DigitalHumani.com.
- Grab your Enterprise ID and API Key from the "Developer" tab.

Basic Usage
-----------

[](#basic-usage)

```
// Create new sandbox instance
$digitalHumani = new DigitalHumani($apiKey, $enterpriseId);

// Plant a tree
$digitalHumani->plantTree('rick@example.com');

// Count trees planted
$digitalHumani->treeCount();
```

Using the `DigitalHumani` instance you may perform multiple actions as well as retrieve the different resources [DigitalHumani's API](https://digitalhumani.com/docs/) provides:

### Managing Enterprises

[](#managing-enterprises)

```
// Get current Enterprise
$enterprise = $digitalHumani->enterprise();

// .. or get Enterprise by ID
$enterprise = $digitalHumani->enterprise('4c6e672d');

// 🌳 Count planted trees
$enterprise->treeCount();

// 🌳 Count planted trees since 2021-01-01
$enterprise->treeCount(Carbon::make('2021-01-01'));

// 🌳 Count planted trees between 2021-01-01 and 2021-08-01
$enterprise->treeCount(Carbon::make('2021-01-01'), Carbon::make('2022-08-01'));

// 🌳 Count planted trees for specific month
$enterprise->treeCountForMonth(Carbon::make('2021-08'));

// 🌳 Plant tree
$enterprise->plantTree('rick@example.com')
```

#### Notice for lines with 🌳 icon:

[](#notice-for-lines-with--icon)

> Since the Enterprise ID is available in the DigitalHumani instance, you may replace `$enterprise`with `$digitalHumani` and expect the same results.

### Managing Projects

[](#managing-projects)

```
// Get list of all Projects
$projects = $digitalHumani->projects();

// Get second project
$project = $projects[1];

// .. or get Project by ID
$project = $digitalHumani->project('81818182');

// Plant a tree for this project
$project->plantTree('rick@example.com', 3);
```

### Managing Trees

[](#managing-trees)

```
// Plant one tree
$tree = $digitalHumani->plantTree('rick@example.com');

// Plant ten trees
$trees = $digitalHumani->plantTree('rick@example.com', 10);

// Get UUID of tree(s)
$uuid = $tree->uuid;

// Get details of a planted tree (or trees) by ID
$digitalHumani->tree('9f05511e-56c6-40f7-b5ca-e25567991dc1');

// Count trees for a user
$digitalHumani->countTreesPlantedByUser('rick@example.com');
```

### Switch to production environment

[](#switch-to-production-environment)

```
// Set the third parameter to "true"
$digitalHumani = new DigitalHumani($apiKey, $enterpriseId, true);

// ..or use a method
$digitalHumani->useProductionEnvironment();
```

### Overrule (default) project or enterprise

[](#overrule-default-project-or-enterprise)

Many methods allow additional parameters to overrule the (default) project or enterprise:

```
// Create new sandbox instance, leaving out the enterpriseId
$digitalHumani = new DigitalHumani($apiKey);

// Plant a tree for a specific project and enterprise
$digitalHumani->plantTree('rick@example.com', 1, $projectId, $enterpriseId);

// Set a default enterprise afterwards, which will be used for all requests from now on
$digitalHumani->setEnterprise('11111111');

// Plant a tree for a specific project using the default enterprise from above
$digitalHumani->plantTree('rick@example.com', 1, $projectId);

// Count trees of a specific month for a specific enterprise, overruling the default
$digitalHumani->treeCountForMonth(Carbon::make('2021-10'), '99999999');
```

Happy planting! 🌳

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Rick Kuilman](https://github.com/rickkuilman)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com)by [Beyond Code](http://beyondco.de/).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Total

3

Last Release

1662d ago

Major Versions

v1.1.0 → v2.0.02021-10-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd2da3a5332840fca6d08025b216041b0f91657a420606633ac3df1d566df147?d=identicon)[rickkuilman](/maintainers/rickkuilman)

---

Top Contributors

[![rickkuilman](https://avatars.githubusercontent.com/u/7881219?v=4)](https://github.com/rickkuilman "rickkuilman (36 commits)")

---

Tags

hacktoberfestphpraasreforestationrickkuilmandigital-humani-php-sdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rickkuilman-digital-humani-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/rickkuilman-digital-humani-php-sdk/health.svg)](https://phpackages.com/packages/rickkuilman-digital-humani-php-sdk)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[ashallendesign/laravel-exchange-rates

A wrapper package for interacting with the exchangeratesapi.io API.

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
