PHPackages                             lionix/digitalocean - 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. [API Development](/categories/api)
4. /
5. lionix/digitalocean

ActiveLibrary[API Development](/categories/api)

lionix/digitalocean
===================

Digital Ocean API for Laravel Framework

v1.0.0(3y ago)0538↓100%MITPHPPHP ^8.0

Since Dec 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lionix-team/digitalocean-api)[ Packagist](https://packagist.org/packages/lionix/digitalocean)[ RSS](/packages/lionix-digitalocean/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Digital Ocean API for Laravel Framework
=======================================

[](#digital-ocean-api-for-laravel-framework)

[![laravel-digitalocean](https://user-images.githubusercontent.com/12999189/208249278-b10946b5-2529-4f2f-b130-449d67ee8a34.png)](https://user-images.githubusercontent.com/12999189/208249278-b10946b5-2529-4f2f-b130-449d67ee8a34.png)

---

Digital Ocean API for Laravel Framework is a package created by Arayik Smbatyan ([@arayiksmbatyan](https://github.com/arayiksmbatyan)) from **Lionix** to make it easier to use Digital Ocean API in Laravel Framework.

The package is not using any external libraries like DO PHP SDK, it uses general DO API, therefore it is very easy extendable.

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

[](#installation)

You can install the package via composer:

```
composer require lionix/digitalocean
```

Publishing the config file
--------------------------

[](#publishing-the-config-file)

```
php artisan vendor:publish --provider="Lionix\DigitalOcean\DigitalOceanServiceProvider" --tag="config"
```

API KEY
-------

[](#api-key)

Open your Digitalocean Account and go to API section. [Generate a new Personal Access Token](https://cloud.digitalocean.com/account/api/tokens/new?i=c1d240) with `write` access and add to your `.env` file.

```
DO_API_KEY=your_api_key
```

Available Services
------------------

[](#available-services)

- [Droplets](#droplets)
- [Droplet Actions](https://docs.lionix.io/laravel-digitalocean-api#droplet-actions)
- [Domains](https://docs.lionix.io/laravel-digitalocean-api#domains)
- [Snapshots](https://docs.lionix.io/laravel-digitalocean-api#snapshots)
- [Global Service](https://docs.lionix.io/laravel-digitalocean-api#global-service)
- [DO Snapshot Command](https://docs.lionix.io/laravel-digitalocean-api#do-snapshot-command)

All the services can be used by injecting the service into your controller, by using the `Digitalocean` facade or by using the service facade (e.g. `Droplets`).

Droplets
--------

[](#droplets)

### Using via Service

[](#using-via-service)

```
