Laravel Packages

DigitalOcean API Client for Laravel

Published
DigitalOcean API Client for Laravel image

The Laravel DigitalOcean package by Graham Campbell is an API client bridge for Laravel. This package uses Graham's manager package, providing the ability to configure multiple connections.

use GrahamCampbell\DigitalOcean\Facades\DigitalOcean;
 
DigitalOcean::droplet()->powerOn(12345);
 
DigitalOcean::size()->getAll();
 
// Specify a connection name
DigitalOcean::connection('your_connection_name')
->droplet()
->getById(12345);

The package integrates with Laravel's service container, allowing you to use the package's Facade or use dependency injection to use the manager:

use GrahamCampbell\DigitalOcean\DigitalOceanManager;
 
public function __construct(private DigitalOceanManager $digitalocean)
{
// ...
$this->digitalocean->region()->getAll();
}

As mentioned in the README, this package is a bridge for the DigitalOcean PHP API client. You can see more examples of how you can use this client to interact with DigitalOcean.

For reference, the published digitalocean.php configuration file includes a setting to define the default connection name, as well as the ability to configure as many connections as you need:

return [
'default' => 'main',
 
'connections' => [
 
'main' => [
'token' => 'your-token',
'method' => 'token',
],
 
],
];

This package supports a wide variety of Laravel versions, the latest supporting Laravel v8 to v11. For more details, visit the GitHub repository and explore its extensive documentation and examples.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Image Dominant Color and HEIC Support in Laravel 13.24 image

Image Dominant Color and HEIC Support in Laravel 13.24

Read article
Official Laravel Zed Extension: LSP for PHP & Blade image

Official Laravel Zed Extension: LSP for PHP & Blade

Read article
Laravel Head: Manage Meta Tags, Open Graph, and JSON-LD image

Laravel Head: Manage Meta Tags, Open Graph, and JSON-LD

Read article
PhpStorm 2026.2 Released image

PhpStorm 2026.2 Released

Read article
Laravel Doctor: Diagnose Your App With One Artisan Command image

Laravel Doctor: Diagnose Your App With One Artisan Command

Read article
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article