PHPackages                             webtamizhan/lagora - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. webtamizhan/lagora

ActiveLibrary[API Development](/categories/api)

webtamizhan/lagora
==================

A Laravel wrapper for Agora Services

v1.0(4y ago)0101MITPHPPHP ^7.4

Since Dec 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/webtamizhan/lagora)[ Packagist](https://packagist.org/packages/webtamizhan/lagora)[ Docs](https://github.com/webtamizhan/lagora)[ GitHub Sponsors](https://github.com/webtamizhan)[ RSS](/packages/webtamizhan-lagora/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

A Laravel wrapper for Agora Services
====================================

[](#a-laravel-wrapper-for-agora-services)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7f747395e617dc634c9a7e3ac850082fb534baf31756aebeae5c758ff1ce2524/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f77656274616d697a68616e2f6c61676f72612e7376673f7374796c653d666c61742d737175617265)](https://github.com/webtamizhan/lagora/releases)[![Total Downloads](https://camo.githubusercontent.com/bc82c187899abc5aadf2114dc26a4df9b8680a9ddf5d1f99d3f49ede2c68534a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77656274616d697a68616e2f6c61676f72612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webtamizhan/lagora)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require webtamizhan/lagora
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Webtamizhan\Lagora\LagoraServiceProvider" --tag="lagora-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Webtamizhan\Lagora\LagoraServiceProvider" --tag="lagora-config"
```

This is the contents of the published config file:

```
return [

    /**
     * To generate Agora APP_ID and APP_CERTIFICATE, Please refer the url below
     * https://docs.agora.io/en/Agora%20Platform/manage_projects?platform=All%20Platforms
     */

    /**
     * Real Time Call & Video Call Service
     */
    "rtc" => [
        'app_id' => env('AGORA_RTC_APP_ID', ""),
        'app_certificate' => env('AGORA_RTC_APP_CERTIFICATE', ""),
    ],

    /**
     * Real Time Messaging
     */
    "rtm" => [
        'app_id' => env('AGORA_RTM_APP_ID', ""),
        'app_certificate' => env('AGORA_RTM_APP_CERTIFICATE', ""),
    ],

    /**
     * Cloud recording needs RTC app_id in order to record your audio and/or video calls on your third party storage providers.
     * So please make sure if you only use recording service, RTC APP ID was not empty!
     * Login into your agora console and enable Cloud Recording Service.
     * We use customer ID and customer secret are used for RESTful API. (https://console.agora.io/restfulApi)
     */
    'cloud_recording' => [
        "customer_id" => config('AGORA_CR_CUSTOMER_ID', ""),
        "customer_certificate" => config('AGORA_CR_CUSTOMER_CERTIFICATE', ""),

        /**
         * Individual Recording - individual //In individual recording mode, the audio and video of each UID in a channel are recorded in separate files.
         * Composite Recording - mix // In composite recording mode, the audio and video of multiple UIDs in a channel are recorded in a single file.
         */
        "recording_mode" => 'mix',

        "recordingConfig" => [
            "maxIdleTime" => 30, // in seconds
            "streamTypes" => 0, // 0 - Audio Only, 1 - Video Only, 2 - Audio & Video(default)
            /**
             *  0: (Default) Sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 48 Kbps.
             * 1: Sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 128 Kbps.
             * 2: Sample rate of 48 kHz, music encoding, stereo, and a bitrate of up to 192 Kbps.
             */
            "audioProfile" => 1,
            "channelType" => 0, // 0 - (Default) Communication profile, 1 - Live broadcast profile
            "videoStreamType" => 1,
        ],
        "recordingFileConfig" => [
            /**
             * hls - (Default) M3U8 and TS files
             * mp4, hls - This value is for composite recording (mix) and web page recording (web) only and must be set together with "hls"; otherwise, the recording service returns error code 2
             */
            "avFileType" => ["hls"]
        ],
        /**
         * Vendor
         *  0: Qiniu Cloud
            1: Amazon S3
            2: Alibaba Cloud
            3: Tencent Cloud
            4: Kingsoft Cloud
         *  Region
         *      When the third-party cloud storage is Qiniu Cloud (vendor = 0):
                0: East China
                1: North China
                2: South China
                3: North America
                4: Southeast Asia
         *
         *      When the third-party cloud storage is Amazon S3 (vendor = 1):
         *      0: US_EAST_1
                1: US_EAST_2
                2: US_WEST_1
                3: US_WEST_2
                4: EU_WEST_1
                5: EU_WEST_2
                6: EU_WEST_3
                7: EU_CENTRAL_1
                8: AP_SOUTHEAST_1
                9: AP_SOUTHEAST_2
                10: AP_NORTHEAST_1
                11: AP_NORTHEAST_2
                12: SA_EAST_1
                13: CA_CENTRAL_1
                14: AP_SOUTH_1
                15: CN_NORTH_1
                16: CN_NORTHWEST_1
                17: US_GOV_WEST_1
         *
         *      When the third-party cloud storage is Alibaba Cloud (vendor = 2):
         *      0: CN_Hangzhou
                1: CN_Shanghai
                2: CN_Qingdao
                3: CN_Beijing
                4: CN_Zhangjiakou
                5: CN_Huhehaote
                6: CN_Shenzhen
                7: CN_Hongkong
                8: US_West_1
                9: US_East_1
                10: AP_Southeast_1
                11: AP_Southeast_2
                12: AP_Southeast_3
                13: AP_Southeast_5
                14: AP_Northeast_1
                15: AP_South_1
                16: EU_Central_1
                17: EU_West_1
                18: EU_East_1
         *
         *      When the third-party cloud storage is Tencent Cloud (vendor = 3):
         *      0：AP_Beijing_1
                1：AP_Beijing
                2：AP_Shanghai
                3：AP_Guangzhou
                4：AP_Chengdu
                5：AP_Chongqing
                6：AP_Shenzhen_FSI
                7：AP_Shanghai_FSI
                8：AP_Beijing_FSI
                9：AP_Hongkong
                10：AP_Singapore
                11：AP_Mumbai
                12：AP_Seoul
                13：AP_Bangkok
                14：AP_Tokyo
                15：NA_Siliconvalley
                16：NA_Ashburn
                17：NA_Toronto
                18：EU_Frankfurt
                19：EU_Moscow
         *
         *      When the third-party cloud storage is Kingsoft Cloud (vendor = 4):
         *      0：CN_Hangzhou
                1：CN_Shanghai
                2：CN_Qingdao
                3：CN_Beijing
                4：CN_Guangzhou
                5：CN_Hongkong
                6：JR_Beijing
                7：JR_Shanghai
                8：NA_Russia_1
                9：NA_Singapore_1
         *
         * bucket: String. The bucket of the third-party cloud storage.
         * accessKey: String. The access key of the third-party cloud storage. Agora suggests that you use a write-only access key.
         * secretKey: String. The secret key of the third-party cloud storage.
         * fileNamePrefix : Folder name - (20210530) Ymd
         */
        "storageConfig" => [
            "vendor" => 1,
            "region" => 14,
            "bucket" => "XXXXXXXXX",
            "accessKey" => "XXXXXXXXX",
            "secretKey" => "XXXXXXXXX",
            "fileNamePrefix" => [(string)Str::slug(date("Y-m-d"),""),]
        ],
        /**
         * Resource token expires in
         */
        "resourceExpiredHour" => 24, // in hours
    ]
];
```

Usage
-----

[](#usage)

```
//RealTime Audio Call && RealTime Video Call Token generation
$channel = 'NewTestChannel';
        $service = new LagoraRTC();
        $service
            ->setUserID(0)
            ->setMinutes(10)
            ->setSeconds(10)
            ->setChannelName($channel)
            ->setRole(1)
            ->getToken();
        $token = $service->token;
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Prabakaran T](https://github.com/webtamizhan)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2411281682b645d6b698d123448bb823995a085783896678e02f9139d9638a9?d=identicon)[webtamizhan](/maintainers/webtamizhan)

---

Top Contributors

[![webtamizhan](https://avatars.githubusercontent.com/u/13689740?v=4)](https://github.com/webtamizhan "webtamizhan (12 commits)")

---

Tags

laravelwebtamizhanlagora

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webtamizhan-lagora/health.svg)

```
[![Health](https://phpackages.com/badges/webtamizhan-lagora/health.svg)](https://phpackages.com/packages/webtamizhan-lagora)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.0k7.8M57](/packages/dedoc-scramble)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
