PHPackages                             estey/hipsupport - 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. estey/hipsupport

AbandonedArchivedLibrary

estey/hipsupport
================

An easy to install Live Chat system that uses HipChat and Laravel.

v1.0.3(11y ago)3324410[1 PRs](https://github.com/BradEstey/hipsupport/pulls)MITPHPPHP &gt;=5.3.0

Since Oct 19Pushed 10y ago1 watchersCompare

[ Source](https://github.com/BradEstey/hipsupport)[ Packagist](https://packagist.org/packages/estey/hipsupport)[ Docs](http://www.bradestey.com/projects/hipsupport)[ RSS](/packages/estey-hipsupport/feed)WikiDiscussions 1.0 Synced 3d ago

READMEChangelogDependencies (10)Versions (6)Used By (0)

HipSupport
==========

[](#hipsupport)

[![Latest Stable Version](https://camo.githubusercontent.com/183b6642f74b490baaac62d0838803057eed7709aff0a8f2f0175cf3875b0090/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65737465792f686970737570706f72742e737667)](https://packagist.org/packages/estey/hipsupport) [![Build Status](https://camo.githubusercontent.com/b8af1196dd48411faadbb314a896fa8d779354dc64c162dafd9746610413b7ad/68747470733a2f2f7472617669732d63692e6f72672f4272616445737465792f686970737570706f72742e7376673f6272616e63683d312e30)](https://travis-ci.org/BradEstey/hipsupport) [![Coverage Status](https://camo.githubusercontent.com/b1b87b939abf4f1d82bbebddde79fb3e52a28903345c7195a3455a0682823fe8/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f4272616445737465792f686970737570706f72742e737667)](https://coveralls.io/r/BradEstey/hipsupport?branch=1.0)

> This project is no longer being actively updated.

HipSupport is a Laravel 4.2 package that facilitates the creation of a live chat support system ontop of HipChat's API. If you are already using Laravel 4.2 and HipChat, then you can have a fully functional live chat system up and running in minutes.

- [How it Works](#how-it-works)
- [Installation](#installation)
- [Configuration](#configuration)
- [Artisan Commands](#artisan-commands)
- [Quickstart](#quickstart)
- [Named Users](#named-users)
- [Limitations](#limitations)

How it Works
------------

[](#how-it-works)

HipChat released a [jQuery HipChat Plugin](http://blog.hipchat.com/2013/08/20/embedding-hipchat/) that allows users to embed a [HipChat Web Client](http://help.hipchat.com/knowledgebase/articles/238941-embedding-hipchat) into their web pages so that users can now access public chat rooms anonymously. HipSupport uses [HipChat's API](https://github.com/hipchat/hipchat-php) to dynamically create a new public chat room for each incoming chat request and send a notification to your company's users of this new chat session. From there, your company's users can join the room and chat with the user.

[![HipChat Embedded Chat Client](https://camo.githubusercontent.com/99df286c2df825cad60f9de863164f35fb71b0cec71670e72d1a07d1a2e190d0/687474703a2f2f7777772e6272616465737465792e636f6d2f696d672f70726f6a656374732f686970737570706f72742f686970636861742d656d6265642e706e67 "HipChat Embedded Chat Client")](https://camo.githubusercontent.com/99df286c2df825cad60f9de863164f35fb71b0cec71670e72d1a07d1a2e190d0/687474703a2f2f7777772e6272616465737465792e636f6d2f696d672f70726f6a656374732f686970737570706f72742f686970636861742d656d6265642e706e67)

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

[](#installation)

Install this package through Composer by editing your project's `composer.json` file to require `estey/hipsupport`.

```
{
    "require": {
        "laravel/framework": "4.2.*",
        "estey/hipsupport": "1.0.*"
    }
}
```

Then, update Composer:

```
composer update
```

Open `app/config/app.php`, and add the service provider to the `providers` array:

```
'Estey\HipSupport\HipSupportServiceProvider'

```

Add the facade to the `aliases` array at the bottom of `app/config/app.php`.

```
'HipSupport' => 'Estey\HipSupport\HipSupportFacade'

```

Configuration
-------------

[](#configuration)

To publish the configuration file, run:

```
php artisan config:publish estey/hipsupport
```

The config file will be located at `app/config/packages/estey/hipsupport/config.php`. An Admin token is required in the `token` field and a user with access to add rooms is required in the `owner_user_id` field.

The `room_name` format should be something unique and by default appends `Y-m-d H:m` to the end of the Room name.

```
[
    'room_name' => 'Live Chat ' . date('Y-m-d H:m')
]
```

Or you can leave this blank and assign it at runtime with whatever you want. Like the user's IP Address or whatever. If a room name already exists then a number will be appended to the end of the name. (This comes at the cost of an extra API request, so be mindful of that. See the [Limitations](#limitations) section for more details.)

To send notifications, you must define the `room_id` in the `notification` array. If the `room_id` is `null` then no notification will be sent.

Artisan Commands
----------------

[](#artisan-commands)

There are two Artisan commands to help you get started. `php artisan hipsupport:online` and `php artisan hipsupport:offline`. These two commands take your live chat online and.. offline. Online accepts a parameter to define how many minutes to bring HipSupport online.

```
php artisan hipsupport:online 480
```

The above command will bring HipSupport online for 8 hours. That way you don't have to remember to turn it off. Check if HipSupport is online using the `HipSupport::isOnline()` method.

Quickstart
----------

[](#quickstart)

To create an absolute basic installation, create a route to handle your incoming chat requests. If HipSupport is Offline then `HipSupport::init()` will return `false`.

```
Route::post('chat', ['before' => 'csrf', function() {
    $room = HipSupport::init();
    if ($room) {
        return Redirect::to($room->hipsupport_url);
    }
}]);
```

In your view, add a form to post into your chat route when HipSupport is online.

```
@if (HipSupport::isOnline())
  {{ Form::open(array('url' => 'chat')) }}
    {{ Form::submit('Start Live Chat') }}
  {{ Form::close() }}
@endif

```

By using JavaScript, you can open the chat up on an iFrame, in an iFrame inside a modal, or open the chat in a new window. The chat screen is simple and automatically resizes to the size of its container. To handle an ajax request, your route would look something like this:

```
Route::post('chat', ['before' => 'csrf', function() {
    $room = HipSupport::init();

    if ($room) {
        if (Request::ajax()) {
            return Response::json(['url' => $room->hipsupport_url]);
        }
        return Redirect::to($room->hipsupport_url);
    }
}]);
```

### Named Users

[](#named-users)

HipChat's API doesn't currently provide a way to name Guests. If you pass `HipSupport::init(array('anonymous' => false))` then HipChat will prompt the user to enter there name, but the page is kind of clunky, isn't responsive and kills the illusion of a live chat system. Alternatively, you can add a form and a layer of validation in front of the `HipSupport::init()` method and pass the user's inputs into the `room_name` and notification `message`. You can even save the user's data (User ID, Name, Email, etc) in your database associated to the chat's `room_id` so that you can attribute the chat history to specific users.

Here's an example of an extremely basic validation.

```
Route::post('chat', ['before' => 'csrf', function() {
    $validator = Validator::make(Input::all(), ['name' => 'required|min:5']);

    if ($validator->fails()) {
        // Redirect with Errors or send Errors via JSON Response...
    }

    $room = HipSupport::init([
        'room_name' => 'Live Chat with ' . Input::get('name'),
        'notification' => [
            'message' => Input::get('name') . ' would like to chat.'
        ]
    ]);

    // Save the name and $room->room_id into the database.
    if ($room) {
        if (Request::ajax()) {
            return Response::json(['url' => $room->hipsupport_url]);
        }
        return Redirect::to($room->hipsupport_url);
    }
}]);
```

Limitations
-----------

[](#limitations)

HipChat's API currently limits API requests to 100 requests per 5 minutes. Each `HipSupport::init()` call eats 3 requests (check if room name exists, create room and notify room). Read more on [HipChat's rate limiting](https://www.hipchat.com/docs/api/rate_limiting).

Too Many Rooms!
---------------

[](#too-many-rooms)

It's probably a good idea to adopt some form of consistent naming of dynamically created rooms. In the next version of HipSupport I plan on added some more Artisan commands to help mass delete or mass archive rooms that have been inactive for a specified amount of time and whose room name contains a given string.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/BradEstey/hipsupport/blob/master/LICENSE) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~88 days

Total

5

Last Release

3872d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65050e2971f866e7a534a49d752b1d885db693dbd86f2c2ec4ab164d0b5f5723?d=identicon)[Brad Estey](/maintainers/Brad%20Estey)

---

Top Contributors

[![BradEstey](https://avatars.githubusercontent.com/u/578665?v=4)](https://github.com/BradEstey "BradEstey (11 commits)")[![orthographic-pedant](https://avatars.githubusercontent.com/u/14522744?v=4)](https://github.com/orthographic-pedant "orthographic-pedant (1 commits)")

---

Tags

laravelLaravel 4hipchatLive ChatHipSupport

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/estey-hipsupport/health.svg)

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

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[cmgmyr/messenger

Simple user messaging tool for Laravel

2.6k2.4M6](/packages/cmgmyr-messenger)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)

PHPackages © 2026

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