2017 © Pedro Peláez
 

package chat

Laravel Chat

image

socieboy/chat

Laravel Chat

  • Wednesday, April 20, 2016
  • by socieboy
  • Repository
  • 3 Watchers
  • 20 Stars
  • 214 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 13 Forks
  • 1 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

Deprecated, (*1)

Laravel Chat

Laravel Chat is a package to make on your own app a chat with multi users and private conversations., (*2)

This package use redis and socket.io to better performance., (*3)

Installation

Required

Install redis on your server., (*4)

nmp install socket.io
nmp install ioredis

Download and Installation

Download laravel chat package to your project, (*5)

composer require "socieboy/chat" "dev-master"

Then execute the command, (*6)

Composer update

Place the service provider on your app.php config file., (*7)

Socieboy\Chat\ChatServiceProvider::class,

Migrations

Now execute the command., (*8)

php artisan chat:tables

Then run, (*9)

php artisan migrate

Update laravel auth

Update the AuthenticatesAndRegistersUsers trait of the laravel auth controller. This trait is updated to fire events when a new user has been logged in and out., (*10)

Socieboy\Chat\Traits\AuthenticatesAndRegistersUsers

Styles and Scripts

Publish the scripts and styles with the command, (*11)

php artisan vendor:publish

Set up on your master view page the fallow code. On the meta tags area between the <head></head> tags., (*12)

<meta name="token" id="token" value="{{ csrf_token() }}">

Also you have to add the style scripts., (*13)

<link rel="stylesheet" href="{{ url('css/chat.css') }}"/>

Same thing with the JS files required, make sure to place them in end before to close the <body><\body> tag., (*14)

<script src="{{ asset('js/socket.io.js') }}"></script>
<script src="{{ url('js/chat.js') }}"></script>

Usage

Run redis on your server, (*15)

redis-server

Then on your project folder execute this code, (*16)

node socket.js

The Versions

20/04 2016

dev-master

9999999-dev

Laravel Chat

  Sources   Download

MIT

The Requires

 

by Francisco Sepulveda