PHPackages                             tipoff/laravel-agora-api - 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. tipoff/laravel-agora-api

ActiveLibrary

tipoff/laravel-agora-api
========================

Laravel Package for wrapper of Agora API

2.0.0(5y ago)62323[5 issues](https://github.com/tipoff/laravel-agora-api/issues)1MITPHPPHP ^7.4|^8.0

Since Mar 14Pushed 5y ago3 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (5)Used By (1)

Laravel Agora Videoconferencing
===============================

[](#laravel-agora-videoconferencing)

[![Latest Version on Packagist](https://camo.githubusercontent.com/02c9aa556b9cb5dec81c1efcdd797b979de0a2320013c37c5ffa9307cfb7f312/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7469706f66662f6c61726176656c2d61676f72612d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tipoff/laravel-agora-api)[![Tests](https://github.com/tipoff/laravel-agora-api/workflows/Tests/badge.svg)](https://github.com/tipoff/laravel-agora-api/workflows/Tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/18c06244aab673a79716c4745110bd37d7b1f271056df95e9da7efd045f45b84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7469706f66662f6c61726176656c2d61676f72612d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tipoff/laravel-agora-api)

This package provides an easy-to-use wrapper for placing video calls via the Agora API in the Laravel framework. The server-side implementation can be used with any Javascript framework (or none at all!), but this package also contains a set of ready-to-use Vue components that can be used for the client-side implementation.

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

[](#installation)

Install the package via composer:

```
composer require tipoff/laravel-agora-api
```

You may publish all of the packages resources (including the frontend assets) with the following command:

```
php artisan vendor:publish --provider="Tipoff\LaravelAgoraApi\LaravelAgoraApiServiceProvider"
```

You may publish just the config file with the following command:

```
php artisan vendor:publish --tag=agora-config
```

Obtain an app ID and certificate from Agora at: `https://www.agora.io/en/`.

Add the following variables to your `.env` file. (Additional config variables are specified in the `agora` config file, but these are the minimum required to use the package.)

```
AGORA_APP_ID={id-obtained-from-Agora}
AGORA_APP_CERTIFICATE={certificate-obtained-from-Agora}

```

If necessary, publish the configuration file and customize the fields used to generate a user's display name by changing the `user_display_name.fields` and `user_display_name.separator` fields.

Server-side Usage
-----------------

[](#server-side-usage)

Retrieving an Agora token:

```
/agora/retrieve-token

```

Placing a call (dispatches an event to start the call):

```
/agora/place-call

```

Installing Optional Frontend Vue Resources
------------------------------------------

[](#installing-optional-frontend-vue-resources)

This package comes with a set of Vue components that you may use alongside the server-side functionality. **You do not have to use these components to use the server-side calls.** However, if you wish to use them, follow these steps to install and configure them in your application:

### Publish the Javascript Assets:

[](#publish-the-javascript-assets)

You may publish the assets with the following command:

```
php artisan vendor:publish --tag=agora-js
```

### Install JS Dependencies via NPM

[](#install-js-dependencies-via-npm)

```
npm install vue vuex agora-rtc-sdk-ng laravel-echo

```

### Import and Initialize Vue and Vuex

[](#import-and-initialize-vue-and-vuex)

Inside your `resources/js/app.js` file, add the code from the following sections:

```
import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

const app = new Vue({
    el: '#app'
});

```

### Register the Vue Components

[](#register-the-vue-components)

```
import AgoraVideoDisplay from './vendor/laravel-agora-api/components/AgoraVideoDisplay.vue';
import AgoraUserList from './vendor/laravel-agora-api/components/AgoraUserList.vue';
import AgoraIncomingCallAlert from './vendor/laravel-agora-api/components/AgoraIncomingCallAlert.vue';
...
Vue.component('agora-video-display', AgoraVideoDisplay);
Vue.component('agora-user-list', AgoraUserList);
Vue.component('agora-incoming-call-alert', AgoraIncomingCallAlert);

```

### Register the Vuex Module

[](#register-the-vuex-module)

This package uses a Vuex module to store and mutate state related to its functionality. This gives you access to the state in any other components you may register if necessary (for instance, to open a modal when a call is incoming).

```
import LaravelAgoraModule from './vendor/laravel-agora-api/modules/LaravelAgoraModule';
...
const store = new Vuex.Store({
    modules: {
        agora: LaravelAgoraModule
    }
})

```

Add the Vuex store to the `Vue` instance like so:

```
const app = new Vue({
    el: '#app',
    store: store
});

```

### Finishing Up Asset Registration

[](#finishing-up-asset-registration)

When you are finished adjusting your `app.js` file, it should look similar to this:

```
import Vue from 'vue';
import Vuex from 'vuex';
import LaravelAgoraModule from './vendor/laravel-agora-api/modules/LaravelAgoraModule';
import AgoraVideoDisplay from './vendor/laravel-agora-api/components/AgoraVideoDisplay.vue';
import AgoraUserList from './vendor/laravel-agora-api/components/AgoraUserList.vue';
import AgoraIncomingCallAlert from './vendor/laravel-agora-api/components/AgoraIncomingCallAlert.vue';
import AgoraCallOutgoingAlert from './vendor/laravel-agora-api/components/AgoraCallOutgoingAlert.vue';

Vue.use(Vuex);

const store = new Vuex.Store({
    modules: {
        agora: LaravelAgoraModule
    }
})

Vue.component('agora-video-display', AgoraVideoDisplay);
Vue.component('agora-user-list', AgoraUserList);
Vue.component('agora-incoming-call-alert', AgoraIncomingCallAlert);
Vue.component('agora-outgoing-call-alert', AgoraCallOutgoingAlert);

const app = new Vue({
    el: '#app',
    store: store
});

```

### Set Up Broadcasting and Laravel Echo

[](#set-up-broadcasting-and-laravel-echo)

Set up broadcasting for your application as detailed in the Laravel documentation at: `https://laravel.com/docs/broadcasting`.

**Note: Don't forget to uncomment `App\Providers\BroadcastServiceProvider::class` in your `app.php` configuration file.**

### Transpile and Place Assets

[](#transpile-and-place-assets)

Run `npm run dev` to transpile the assets. You may now use the Vue components within your app like so:

```

```

### Updating Package Resources

[](#updating-package-resources)

After updating to a newer package version, use `php artisan vendor:publish --tag=agora-js --force` to make sure that updates to package resources are republished to your application's `resources` directory.

Styling Components
------------------

[](#styling-components)

The Vue components available with this package have a variety of CSS classes attached to their HTML elements. This allows you to "hook" into the components and style them without having to modify them directly. You may view the various CSS classes available on the individual Vue components.

A starter file written in TailwindCSS can be published by running `php artisan vendor:publish --tag=agora-css`. After it is published, include it in your `resources/css/app.css` file (`@import 'vendor/agora-component-styles.css';`) and Laravel Mix will transpile it into your application for you (if using the default Mix setup).

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Tipoff](https://github.com/tipoff)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance3

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 81.2% 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

Every ~35 days

Total

2

Last Release

1847d ago

Major Versions

1.0.0 → 2.0.02021-04-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ccc9e3647546c97a5a77b995736302afd85bebdcb43d8fde7d11486579c30c0?d=identicon)[drewroberts](/maintainers/drewroberts)

---

Top Contributors

[![kylebarney](https://avatars.githubusercontent.com/u/15039520?v=4)](https://github.com/kylebarney "kylebarney (147 commits)")[![drewroberts](https://avatars.githubusercontent.com/u/24581081?v=4)](https://github.com/drewroberts "drewroberts (24 commits)")[![huntermontell](https://avatars.githubusercontent.com/u/64396917?v=4)](https://github.com/huntermontell "huntermontell (9 commits)")[![joshtorres](https://avatars.githubusercontent.com/u/5092957?v=4)](https://github.com/joshtorres "joshtorres (1 commits)")

---

Tags

tipofflaravel-agora-api

### Embed Badge

![Health badge](/badges/tipoff-laravel-agora-api/health.svg)

```
[![Health](https://phpackages.com/badges/tipoff-laravel-agora-api/health.svg)](https://phpackages.com/packages/tipoff-laravel-agora-api)
```

###  Alternatives

[tipoff/reviews

Laravel Package for tracking Google reviews

131.0k](/packages/tipoff-reviews)

PHPackages © 2026

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