Package Data | |
---|---|
Maintainer Username: | toin0u |
Maintainer Contact: | contact@sbin.dk (Antoine Corcy) |
Package Create Date: | 2013-08-18 |
Package Last Update: | 2014-12-17 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:25:18 |
Package Statistics | |
---|---|
Total Downloads: | 396 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 19 |
Total Watchers: | 4 |
Total Forks: | 1 |
Total Open Issues: | 0 |
The version 2 of the API will be available soon! Please visit Laravel DigitalOcean by Graham Campbell.
This package allows you to use DigitalOcean in Laravel 4.
It can be found on Packagist. The recommended way is through composer.
Edit compose.json
and add:
{
"require": {
"toin0u/digitalocean-laravel": "0.2.*"
}
}
And install dependecies:
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
Find the providers
key in app/config/app.php
and register the DigitalOcean Service Provider.
'providers' => array(
// ...
'Toin0u\DigitalOcean\DigitalOceanServiceProvider',
)
Find the aliases
key in app/config/app.php
and register the DigitalOcean Facade.
'aliases' => array(
// ...
'DigitalOcean' => 'Toin0u\DigitalOcean\DigitalOceanFacade',
)
You need to copy the config file into your project by running:
$ php artisan config:publish toin0u/digitalocean-laravel
Finally you need to edit app/config/packages/toin0u/digitalocean-laravel/config.php
with your client ID
and the API Key.
Use the DigitalOcean API:
// if you don't want to use the defaut adapter but rather Buzz
DigitalOcean::setAdapter(new \HttpAdapter\BuzzHttpAdapter());
$activeDroplets = DigitalOcean::droplets()->showAllActive();
var_dump($activeDroplets);
// object(stdClass)[61]
// public 'status' => string 'OK' (length=2)
// public 'droplets' =>
// array (size=1)
// 0 =>
// object(stdClass)[62]
// public 'id' => int 347553
// public 'name' => string 'foobar' (length=6)
// public 'image_id' => int 284212
// public 'size_id' => int 66
// public 'region_id' => int 4
// public 'backups_active' => boolean false
// public 'ip_address' => string '192.241.175.217' (length=15)
// public 'private_ip_address' => null
// public 'locked' => boolean false
// public 'status' => string 'active' (length=6)
// public 'created_at' => string '2013-01-07T01:37:21Z' (length=20)
Please open an issues in github
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the Contributor Covenant, version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/
DigitalOcean-laravel is released under the MIT License. See the bundled LICENSE file for details.