PHPackages                             frutdev/laravchat - 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. [Framework](/categories/framework)
4. /
5. frutdev/laravchat

ActiveLibrary[Framework](/categories/framework)

frutdev/laravchat
=================

Laravel real-time chat application

V1.0.1(8y ago)5612PHPPHP &gt;=7.0.0

Since Oct 10Pushed 8y ago4 watchersCompare

[ Source](https://github.com/frutos93/laravchat)[ Packagist](https://packagist.org/packages/frutdev/laravchat)[ RSS](/packages/frutdev-laravchat/feed)WikiDiscussions dev Synced 3d ago

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

Laravchat
=========

[](#laravchat)

Laravchat is a real-time chat package that will enable logged in users in an application to start conersations with other users and chat in real-time for Laravel 5.4+. This package works with Laravel, Vuejs, Pusher and Laravel Echo.

Prerequisite
------------

[](#prerequisite)

You will need to have Pusher keys. Go to pusher.com and register for free, create an app and you will get your keys for the package.

Installing
----------

[](#installing)

To install the package just run

```
composer require frutdev/laravchat

```

After this you'll have to have some things, follow these instructions:

First of all you will need to run

```
composer require pusher/pusher-php-server "~3.0"
npm install
npm install --save laravel-echo pusher-js

```

This package uses `Carbon` package so make sure to run, if you don't have it already:

```
composer require nesbot/carbon

```

IMPORTANT
---------

[](#important)

Configure your `.env` file with your Pusher Key `PUSHER_APP_ID`, `PUSHER_APP_KEY`,`PUSHER_APP_SECRET`.

Within the `.env` file also modify the `BROADCAST_DRIVER` field with `pusher` so it should look like this: `BROADCAST_DRIVER=pusher`

In `config/broadcasting.php` add the following to the `options` in `pusher`

```
'cluster' => 'us2',  //OR YOUR OWN CLUSTER
'encrypted' => false,

```

Run

```
php artisan make:auth

```

Run

```
php artisan vendor:publish

```

And select `Frutdev\Laravchat\LaravchatServiceProvider`

After doing this add the following line to your the `mix` in `webpack.mix.js`

```
.js('resources/assets/laravchatjs/laravchat.js', 'public/js')

```

Add on top of your `resources/views/layouts/app.blade.php`

```

```

And on the bottom add

```

	@yield('chat')

    window.Laravel =

```

Note that `PUSHER_APP_KEY` and `PUSHER_APP_CLUSTER` will be the same ones you put in your `.env`The `
