blackcube/dboard-bridge
Composer 安装命令:
composer require blackcube/dboard-bridge
包简介
Blackcube Dboard bridge for non-Yii3 frameworks
关键字:
README 文档
README
Bridge for running the Blackcube admin panel (dboard) inside non-Yii3 frameworks. Boots a Yii3 sub-application, handles the request, returns a PSR-7 response.
Where dboard-bridge sits
┌─────────────────────────────────┐
│ your app (Slim / Laravel / …) │
└────────────────┬────────────────┘
↓
┌─────────────────────────────────┐
│ dboard-bridge ← you are here │
│ boots Yii3, returns PSR-7 │
└────────────────┬────────────────┘
↓
┌──────────────┐
│ dboard │
│ (admin panel)│
└──────┬───────┘
↓
┌──────────┐
│ dcore │
│ (data) │
└──────────┘
↓
DB
Quickstart
composer require blackcube/dboard-bridge
Create a dboard/ config directory at your project root with a configuration.php:
<?php declare(strict_types=1); if (!class_exists(\Blackcube\DboardBridge\DboardBridge::class)) { return []; } return [ 'config-plugin' => [ 'di' => 'common/di/*.php', 'di-web' => [ '$di', 'web/di/*.php', ], ], 'config-plugin-options' => [ 'source-directory' => 'dboard', ], ];
The host project must provide DB connection, OAuth2 params and dboard params in this config directory.
Integration
Slim
Native PSR-7 — no conversion needed:
use Blackcube\DboardBridge\DboardBridge; if (class_exists(DboardBridge::class)) { $app->any('/dboard[/{path:.*}]', function () { return DboardBridge::handle( dirname(__DIR__), debug: true, configDirectory: 'dboard', ); }); }
Laravel
Requires manual PSR-7 conversion:
use Blackcube\DboardBridge\DboardBridge; if (class_exists(DboardBridge::class)) { Route::any('/dboard/{path?}', function (Request $request) { $psrFactory = new \HttpSoft\Message\ServerRequestFactory(); $streamFactory = new \HttpSoft\Message\StreamFactory(); $psrRequest = $psrFactory->createServerRequest( $request->method(), $request->fullUrl(), $_SERVER, ); $psrRequest = $psrRequest ->withQueryParams($request->query->all()) ->withCookieParams($_COOKIE) ->withParsedBody($request->all()) ->withBody($streamFactory->createStream($request->getContent())); foreach ($request->headers->all() as $name => $values) { $psrRequest = $psrRequest->withHeader($name, $values); } $psr = DboardBridge::handle( base_path(), debug: true, configDirectory: 'dboard', request: $psrRequest, ); $response = response($psr->getBody()->getContents(), $psr->getStatusCode()); foreach ($psr->getHeaders() as $name => $values) { foreach ($values as $value) { $response->headers->set($name, $value, false); } } return $response; })->where('path', '.*'); }
Laravel also requires CSRF and cookie exemptions in bootstrap/app.php:
$middleware->validateCsrfTokens(except: ['dboard/*', 'dboard']); $middleware->encryptCookies(except: ['PHPSESSID', 'access_token', '_csrf']);
API
DboardBridge::handle(
string $rootPath, // project root
bool $debug = false, // debug mode
string $configDirectory = 'config', // Yii3 config directory
?ServerRequestInterface $request = null, // PSR-7 request (recommended)
): ResponseInterface
The request parameter is recommended when the host framework consumes php://input before Yii3 can read it (Laravel, Symfony). Slim passes PSR-7 natively.
License
BSD-3-Clause. See LICENSE.md.
blackcube/dboard-bridge 适用场景与选型建议
blackcube/dboard-bridge 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「admin」 「cms」 「Bridge」 「blackcube」 「dboard」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 blackcube/dboard-bridge 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 blackcube/dboard-bridge 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 blackcube/dboard-bridge 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Soluble PHP Java bridge integration
Bridge between JMS Serializer Bundle and Superdesk Web Publisher.
2lenet/EasyAdminPlusBundle
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-04-07