codebar-ag/laravel-miro
Composer 安装命令:
composer require codebar-ag/laravel-miro
包简介
A simple way to interact with the Miro API in Laravel
README 文档
README
This package was developed to give you a quick start to the Miro API.
📑 Table of Contents
- What is Miro?
- Requirements
- Installation
- Laravel Boost Skill
- Usage
- API Reference
- Testing
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
💡 What is Miro?
Miro is an online collaborative whiteboard platform that enables teams to work effectively together, from brainstorming with digital sticky notes to planning and managing agile workflows.
🛠 Requirements
| Package | PHP | Laravel |
|---|---|---|
| v0.1.1 | ^8.4 | ^12.0 | ^13.0 |
⚙️ Installation
You can install the package via composer:
composer require codebar-ag/laravel-miro
Optionally, you can publish the config file with:
php artisan vendor:publish --tag="laravel-miro-config"
Add your Miro access token to your .env file:
MIRO_ACCESS_TOKEN=your_access_token_here
You can generate a personal access token at miro.com/app/settings/user-profile/apps.
🤖 Laravel Boost Skill
This package includes a Laravel Boost skill. If you use Laravel Boost in your project, the skill is automatically installed when you run:
php artisan boost:install
The skill provides AI agents with full context about the package — available methods, DTOs, response handling, and usage patterns.
🚀 Usage
All methods are available via the Miro facade and return a typed Response object.
use CodebarAg\Miro\Facades\Miro; $response = Miro::getBoard('board_id');
Response Handling
All *Response objects expose the following methods:
$response->successful(); // bool $response->failed(); // bool $response->status(); // int (e.g. 200, 404, 429) $response->error(); // ?string — null on success $response->errorCode(); // ?string — null on success $response->dto(); // typed DTO or array of DTOs, null on failure
Check successful() before accessing the DTO — no try/catch needed for API errors like 404, 429, or 400.
$response = Miro::getBoard('board_id'); if ($response->successful()) { $board = $response->dto(); // BoardDto } else { $response->status(); // e.g. 404 $response->error(); // e.g. "Board not found" $response->errorCode(); // e.g. "board_not_found" }
DTOs
We provide DTOs for the following:
| DTO | Fields |
|---|---|
BoardDto |
id, name, description, type, viewLink, teamId, projectId, createdAt, modifiedAt |
BoardItemDto |
id, type, data, position, geometry, createdAt, modifiedAt, parentId |
StickyNoteDto |
id, type, content, shape, fillColor, textAlign, textAlignVertical, positionX, positionY, width, height, parentId, createdAt, modifiedAt |
FrameDto |
id, type, title, fillColor, positionX, positionY, width, height, parentId, createdAt, modifiedAt |
API Reference
Boards
use CodebarAg\Miro\Facades\Miro; use CodebarAg\Miro\Dto\Boards\CreateBoardDto; use CodebarAg\Miro\Dto\Boards\GetBoardsDto; use CodebarAg\Miro\Dto\Boards\UpdateBoardDto;
/** * Get All Boards */ $response = Miro::getBoards(); $boards = $response->dto(); // BoardDto[]
/** * Get Boards With Filters */ $response = Miro::getBoards(new GetBoardsDto( teamId: 'team_123', limit: 10, ));
/** * Get A Board */ $response = Miro::getBoard('board_id'); $board = $response->dto(); // BoardDto
/** * Create A Board */ $response = Miro::createBoard(new CreateBoardDto( name: 'My Sprint Board', description: 'Q1 planning board', )); $board = $response->dto(); // BoardDto
/** * Update A Board */ $response = Miro::updateBoard('board_id', new UpdateBoardDto( name: 'Q1 Planning', )); $board = $response->dto(); // BoardDto
/** * Delete A Board */ Miro::deleteBoard('board_id'); // returns Saloon\Http\Response
Board Items
use CodebarAg\Miro\Facades\Miro; use CodebarAg\Miro\Dto\BoardItems\GetBoardItemsDto;
/** * Get All Items On A Board */ $response = Miro::getBoardItems('board_id'); $items = $response->dto(); // BoardItemDto[]
/** * Get Items Filtered By Type */ $response = Miro::getBoardItems('board_id', new GetBoardItemsDto( type: 'sticky_note', ));
/** * Get A Board Item */ $response = Miro::getBoardItem('board_id', 'item_id'); $item = $response->dto(); // BoardItemDto
Sticky Notes
use CodebarAg\Miro\Facades\Miro; use CodebarAg\Miro\Dto\StickyNotes\CreateStickyNoteDto; use CodebarAg\Miro\Dto\StickyNotes\GetStickyNotesDto; use CodebarAg\Miro\Dto\StickyNotes\UpdateStickyNoteDto;
/** * Get All Sticky Notes On A Board */ $response = Miro::getStickyNotes('board_id'); $notes = $response->dto(); // StickyNoteDto[]
/** * Get A Sticky Note */ $response = Miro::getStickyNote('board_id', 'item_id'); $note = $response->dto(); // StickyNoteDto
/** * Create A Sticky Note */ $response = Miro::createStickyNote('board_id', new CreateStickyNoteDto( content: 'Hello World', shape: 'square', fillColor: 'yellow', positionX: 100.0, positionY: 200.0, )); $note = $response->dto(); // StickyNoteDto
/** * Update A Sticky Note */ $response = Miro::updateStickyNote('board_id', 'item_id', new UpdateStickyNoteDto( content: 'Updated content', )); $note = $response->dto(); // StickyNoteDto
/** * Delete A Sticky Note */ Miro::deleteStickyNote('board_id', 'item_id'); // returns Saloon\Http\Response
Frames
use CodebarAg\Miro\Facades\Miro; use CodebarAg\Miro\Dto\Frames\CreateFrameDto; use CodebarAg\Miro\Dto\Frames\GetFramesDto; use CodebarAg\Miro\Dto\Frames\UpdateFrameDto;
/** * Get All Frames On A Board */ $response = Miro::getFrames('board_id'); $frames = $response->dto(); // FrameDto[]
/** * Get A Frame */ $response = Miro::getFrame('board_id', 'item_id'); $frame = $response->dto(); // FrameDto
/** * Create A Frame */ $response = Miro::createFrame('board_id', new CreateFrameDto( title: 'Sprint 1', positionX: 0.0, positionY: 0.0, width: 1920.0, height: 1080.0, )); $frame = $response->dto(); // FrameDto
/** * Update A Frame */ $response = Miro::updateFrame('board_id', 'item_id', new UpdateFrameDto( title: 'Sprint 1 – Updated', )); $frame = $response->dto(); // FrameDto
/** * Delete A Frame */ Miro::deleteFrame('board_id', 'item_id'); // returns Saloon\Http\Response
🧪 Testing
composer test
To run the live API tests against the real Miro API, set your token as an environment variable:
MIRO_ACCESS_TOKEN=your_access_token_here
vendor/bin/pest --group=live
Alternatively, add it to .env.testing in the project root.
📝 Changelog
Please see CHANGELOG for more information on what has changed recently.
⚒️ Contributing
Please see CONTRIBUTING for details.
🔒️ Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
🙏 Credits
📄 License
The MIT License (MIT). Please see License File for more information.
codebar-ag/laravel-miro 适用场景与选型建议
codebar-ag/laravel-miro 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「codebar-ag」 「laravel-miro」 「miro」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 codebar-ag/laravel-miro 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 codebar-ag/laravel-miro 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 codebar-ag/laravel-miro 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Cloudinary Flysystem 3 integration with Laravel
This is my package laravel-flysystem-cloudinary-nova
Permissions-Policy (Feature-Policy) header builder and middleware for Laravel
Bexio integration with Laravel
Zendesk integration with Laravel
This is my package laravel-auth
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-18