GithubHelp home page GithubHelp logo

laravel-chat's Introduction

ReeNekt/laravel-chat

Simple chat application based on Laravel framework, Laravel Echo Server and Socket.IO

Installing

  1. Clone this repository git clone https://github.com/ReeNekt/laravel-chat.git <project folder>
  2. Install redis server sudo apt install redis-server
  3. Change to the project directory cd <project folder>
  4. Install composer dependencies composer install
  5. Install npm modules Using NPM: npm install Using yarn: yarn
  6. Copy .env.example to .env and edit if you need
  7. If you haven't installed Laravel Echo Server use sudo npm install -g laravel-echo-server
  8. Init Laravel Echo: laravel-echo-server init
  • Options
    • development mode - yes (Recommended)
    • port 6001 (default) (Recommended)
    • database - redis (Necessarily)
    • host - localhost (default) (Recommended)
    • HTTP/HTTPS - HTTP (Recommended)
    • HTTP API - no
    • cross domain access - no

You always can edit this options in config file. If you select a port other than 6001, change the line in the resources / js / bootstrap.js file and then use npm run dev

window.Echo = new Echo({
    broadcaster: 'socket.io',
    host: window.location.hostname + ':6001' //change 6001 to your chosen port
});
  1. Start Laravel Echo Server and Laravel Queue laravel-echo-server start php artisan queue:work

Checklist

  • Public chat (works with two and more browser windows, without authorization)
  • Private chats

If you have problem, try this command in <froject folder>: php artisan config:cache

laravel-chat's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.