laravel-cloud-laravel maintained by community-sdks
Laravel Cloud Laravel
A small Laravel wrapper for community-sdks/laravel-cloud-php. It registers the typed SDK client in Laravel's container and provides a facade.
This is a community-maintained project and is not an official Laravel package.
Requirements
- PHP 8.3+
- Laravel 11, 12, or 13
Installation
composer require community-sdks/laravel-cloud-laravel
Add your Laravel Cloud API token to .env:
LARAVEL_CLOUD_TOKEN=your-api-token
The service provider and facade alias are discovered automatically. To publish the optional configuration file:
php artisan vendor:publish --tag=laravel-cloud-config
Usage
Use the facade to access any service exposed by the underlying SDK:
use CommunitySDKs\LaravelCloud\DTO\Requests\Applications\ListApplicationsRequest;
use CommunitySDKs\LaravelCloudLaravel\Facades\LaravelCloud;
$applications = LaravelCloud::applications()->list(
new ListApplicationsRequest(),
);
Or inject the SDK client directly:
use CommunitySDKs\LaravelCloud\Client;
final class ListCloudApplications
{
public function __construct(private Client $cloud) {}
public function __invoke(): mixed
{
return $this->cloud->applications()->list();
}
}
For request DTOs, response types, and supported endpoints, see the PHP SDK documentation.
Configuration
The wrapper supports these environment variables:
| Variable | Default |
|---|---|
LARAVEL_CLOUD_TOKEN |
required when resolving the client |
LARAVEL_CLOUD_BASE_URI |
https://cloud.laravel.com/api/ |
LARAVEL_CLOUD_TIMEOUT |
30 seconds |
LARAVEL_CLOUD_CONNECT_TIMEOUT |
10 seconds |
Testing
composer install
composer check
License
MIT