zeevx/laravel-brimble-sandbox
Composer 安装命令:
composer require zeevx/laravel-brimble-sandbox
包简介
Laravel integration for the Brimble Sandbox PHP SDK: config, container binding, facade, and Artisan commands.
README 文档
README
Laravel integration for zeevx/php-brimble-sandbox: a config file, a container binding, a facade, and Artisan commands. All the API logic lives in the core package; this is the glue.
Install
composer require zeevx/laravel-brimble-sandbox
The service provider and BrimbleSandbox facade are auto-discovered. Publish the config if you want to tweak defaults:
php artisan vendor:publish --tag=brimble-sandbox-config
Configure
Set your key in .env:
BRIMBLE_SANDBOX_KEY=your-api-key
Optional overrides (shown with defaults):
BRIMBLE_SANDBOX_BASE_URL=https://sandbox.brimble.io BRIMBLE_SANDBOX_TIMEOUT=90 BRIMBLE_SANDBOX_MAX_RETRIES=2
Usage
Resolve the client from the container, inject it, or use the facade. All three give you the same configured Zeevx\BrimbleSandbox\Sandbox instance.
use Zeevx\LaravelBrimbleSandbox\Facades\BrimbleSandbox; use Zeevx\BrimbleSandbox\Requests\CreateSandbox; use Zeevx\BrimbleSandbox\Requests\ExecInput; $sb = BrimbleSandbox::sandboxes()->create(new CreateSandbox(template: 'node-22')); echo $sb->exec(new ExecInput('node -v'))->stdout; $sb->destroy();
Dependency injection:
use Zeevx\BrimbleSandbox\Sandbox; public function __construct(private readonly Sandbox $brimble) {}
See the core package README for the full API (exec/code, streaming, files, snapshots, volumes, pagination, error handling).
Artisan commands
# List your sandboxes php artisan brimble:sandbox:list --page=1 --limit=15 # Run a shell command inside a sandbox (add --stream for live output) php artisan brimble:sandbox:exec {id} "npm test" --stream # Destroy a sandbox (add --force to skip the prompt) php artisan brimble:sandbox:destroy {id}
Development
composer test # Pest + Testbench composer lint # Pint composer analyse # PHPStan (Larastan)
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-05