定制 abdelhamiderrahmouni/laravel-dailyco 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abdelhamiderrahmouni/laravel-dailyco

Composer 安装命令:

composer require abdelhamiderrahmouni/laravel-dailyco

包简介

[Unofficial] Laravel SDK for Daily.co

README 文档

README

Total Downloads Latest Stable Version License

An unofficial Laravel SDK for Daily.co's REST API. This package provides a clean, expressive interface for interacting with Daily.co video infrastructure from your Laravel application — including support for rooms, meetings, recordings, transcripts, presence, and more.

Requirements

  • PHP 8.1 or higher
  • Laravel 10, 11, or 12

Installation

Install via Composer:

composer require abdelhamiderrahmouni/laravel-dailyco

Add your API key to your .env file:

DAILYCO_API_KEY=your-api-key-here
DAILYCO_DOMAIN=your-domain-here # Optional

Optionally publish the configuration file:

php artisan vendor:publish --provider="AbdelhamidErrahmouni\LaravelDailyco\ServiceProvider" --tag="config"

Usage

All methods are available via the Dailyco facade. You can also inject or instantiate AbdelhamidErrahmouni\LaravelDailyco\Dailyco directly if needed.

use AbdelhamidErrahmouni\LaravelDailyco\Facades\Dailyco;

All methods return a raw array by default. To receive typed Data Transfer Objects instead, see the DTO Support section.

Rooms

// Get all rooms
Dailyco::rooms();

// Get all rooms with filters
Dailyco::rooms(['limit' => 10, 'starting_after' => 'room-name']);

// Get a specific room
Dailyco::room('room-name');

// Create a room
Dailyco::createRoom([
    'name'    => 'my-room',
    'privacy' => 'public',
]);

// Update a room
Dailyco::updateRoom('room-name', [
    'privacy' => 'private',
]);

// Delete a room
Dailyco::deleteRoom('room-name');

// Get active participants in a room
Dailyco::roomPresence('room-name');

// Send an app message to participants in a room
Dailyco::sendAppMessage('room-name', ['data' => 'hello']);

// Get room session data
Dailyco::roomSessionData('room-name');

// Set room session data
Dailyco::setRoomSessionData('room-name', ['expiryTime' => 3600]);

// Eject all participants from a room
Dailyco::ejectParticipant('room-name');

// Update participant permissions in a room
Dailyco::updateParticipantPermissions('room-name', ['permissions' => [...]]);

Meeting Tokens

// Create a meeting token
Dailyco::createMeetingToken([
    'properties' => [
        'room_name' => 'my-room',
        'is_owner'  => true,
        'exp'       => now()->addHour()->timestamp,
    ],
]);

// Validate a meeting token
Dailyco::meetingToken('your-token-string');

Meetings

// Get all meetings
Dailyco::meetings();

// Get all meetings with filters
Dailyco::meetings(['room' => 'room-name', 'limit' => 20]);

// Get a specific meeting
Dailyco::meeting('meeting-id');

// Get participants for a meeting
Dailyco::meetingParticipants('meeting-id');

Recordings

// Get all recordings
Dailyco::recordings();

// Get a specific recording
Dailyco::recording('recording-id');

// Delete a recording
Dailyco::deleteRecording('recording-id');

// Get a short-lived access link for a recording
Dailyco::recordingAccessLink('recording-id');

// Get a download link using a share token
Dailyco::recordingDownload('share-token');

// Create a recording composites recipe
Dailyco::createRecordingCompositesRecipe('recording-id', [...]);

// Get composites for a recording
Dailyco::recordingComposites('recording-id');

Transcripts

// Get all transcripts
Dailyco::transcripts();

// Get a specific transcript
Dailyco::transcript('transcript-id');

// Delete a transcript
Dailyco::deleteTranscript('transcript-id');

// Get a short-lived access link for a transcript
Dailyco::transcriptAccessLink('transcript-id');

Presence

// Get near-real-time participant presence data across all rooms
Dailyco::presence();

Logs

// Get call logs and metrics
Dailyco::logs();

// Get call logs with filters
Dailyco::logs(['mtgSessionId' => 'session-id']);

// Get REST API request logs
Dailyco::apiLogs();

Webhooks

// Get all webhooks
Dailyco::webhooks();

// Create a webhook
Dailyco::createWebhook([
    'url'         => 'https://example.com/webhook',
    'event_types' => ['meeting.started', 'meeting.ended'],
]);

// Get a specific webhook
Dailyco::webhook('webhook-id');

// Update a webhook
Dailyco::updateWebhook('webhook-id', ['url' => 'https://example.com/new-webhook']);

// Delete a webhook
Dailyco::deleteWebhook('webhook-id');

Domain Configuration

// Get domain configuration
Dailyco::getDomainConfig();

// Update domain configuration
Dailyco::updateDomainConfig(['hipaa' => true]);

Dial-in Configuration

// List all dial-in configurations
Dailyco::listDomainDialinConfigs();

// Create a dial-in configuration
Dailyco::createDomainDialinConfig([...]);

// Get a specific dial-in configuration
Dailyco::domainDialinConfig('config-id');

// Update a dial-in configuration
Dailyco::updateDomainDialinConfig('config-id', [...]);

// Delete a dial-in configuration
Dailyco::deleteDomainDialinConfig('config-id');

// Update pinless call config
Dailyco::pinlessCallUpdate([...]);

Phone Numbers

// List available phone numbers to purchase
Dailyco::listAvailableNumbers();

// Buy a phone number
Dailyco::buyPhoneNumber(['country' => 'US']);

// List purchased phone numbers
Dailyco::purchasedPhoneNumbers();

// Release a purchased phone number
Dailyco::releasePhoneNumber('phone-number-id');

Batch Processing

// Get all batch jobs
Dailyco::batchJobs();

// Submit a new batch job
Dailyco::submitBatchJob([...]);

// Get a specific batch job
Dailyco::batchJob('job-id');

// Delete a batch job
Dailyco::deleteBatchJob('job-id');

// Get the output of a batch job
Dailyco::batchJobOutput('job-id');

DTO Support

By default, all methods return raw arrays. To receive fully-typed PHP objects instead, chain withDto() before your method call. This does not mutate the singleton — every call to withDto() returns a fresh proxy instance.

use AbdelhamidErrahmouni\LaravelDailyco\Facades\Dailyco;

Available DTOs

Method Return Type
rooms() Collection<RoomDTO>
room() RoomDTO
createRoom() RoomDTO
updateRoom() RoomDTO
roomPresence() Collection<PresenceDTO>
meetings() Collection<MeetingDTO>
meeting() MeetingDTO
createMeetingToken() MeetingTokenDTO
meetingToken() MeetingTokenDTO
recordings() Collection<RecordingDTO>
recording() RecordingDTO
transcripts() Collection<TranscriptDTO>
transcript() TranscriptDTO
logs() LogResponseDTO
apiLogs() Collection<ApiLogDTO>

Methods not listed in the table (e.g. deleteRoom, deleteRecording) return the raw array as usual.

Examples

Single resource:

$room = Dailyco::withDto()->room('my-room');

echo $room->name;                         // string
echo $room->privacy;                      // string
echo $room->createdAt->format('Y-m-d');   // DateTimeImmutable

List of resources:

$rooms = Dailyco::withDto()->rooms(); // Collection<RoomDTO>

foreach ($rooms as $room) {
    echo "{$room->name} ({$room->privacy})";
}

Meeting with participants:

$meeting = Dailyco::withDto()->meeting('meeting-id');

echo $meeting->room;
echo $meeting->startTime->format('H:i'); // DateTimeImmutable

foreach ($meeting->participants as $participant) {
    echo $participant->userName;
    echo $participant->duration; // seconds
}

Call logs (structured response):

$response = Dailyco::withDto()->logs();

// $response->logs is a Collection<LogDTO>
foreach ($response->logs as $log) {
    echo "[{$log->level}] {$log->message}";
}

// $response->metrics is a raw array (complex nested structure)
$metrics = $response->metrics;

API request logs (flat list):

$apiLogs = Dailyco::withDto()->apiLogs(); // Collection<ApiLogDTO>

foreach ($apiLogs as $log) {
    echo "{$log->method} {$log->url}{$log->status}";
}

Presence (flattened by room):

$participants = Dailyco::withDto()->roomPresence('my-room'); // Collection<PresenceDTO>

foreach ($participants as $participant) {
    echo "{$participant->userName} in {$participant->room}";
}

Handling Errors

This package throws typed exceptions for all non-2xx responses.

Status Code Exception
400 Bad Request Exceptions\BadRequestException
401 Unauthorized Exceptions\UnauthorizedException
403 Forbidden Exceptions\ForbiddenException
404 Not Found Exceptions\NotFoundException
429 Too Many Requests Exceptions\TooManyRequestsException
5xx Server Error Exceptions\ServerErrorException

All exceptions are under the AbdelhamidErrahmouni\LaravelDailyco\Exceptions namespace.

use AbdelhamidErrahmouni\LaravelDailyco\Exceptions\NotFoundException;
use AbdelhamidErrahmouni\LaravelDailyco\Exceptions\TooManyRequestsException;

try {
    $room = Dailyco::room('non-existent-room');
} catch (NotFoundException $e) {
    // Room does not exist
} catch (TooManyRequestsException $e) {
    // Back off and retry
}

Credits

Special thanks to Steadfast Collective for their original package upon which this SDK was built.

Security

If you discover a security vulnerability, please email abdelhamiderrahmouni@gmail.com directly rather than using the issue tracker.

License

This package is open-sourced software licensed under the MIT License.

abdelhamiderrahmouni/laravel-dailyco 适用场景与选型建议

abdelhamiderrahmouni/laravel-dailyco 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 abdelhamiderrahmouni/laravel-dailyco 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 abdelhamiderrahmouni/laravel-dailyco 我们能提供哪些服务?
定制开发 / 二次开发

基于 abdelhamiderrahmouni/laravel-dailyco 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 31
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2026-02-23