Skip to content

lakshmaji/larasocket

Repository files navigation

Laravel PHP Framework

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.

Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.

Official Documentation

Documentation for the framework can be found on the Laravel website.

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

License

The Laravel framework is open-sourced software licensed under the MIT license Larasocket

INDEX

[TOC]

Chat application using Laravel, Redis, socket.io and node js


Prerequisites

You need to have following installed:

  • Laravel
  • Redis you can check installation of Redis using redis-cli monitor or redis-cli ping command from your terminal The outputs of both commands would be "OK" and "PONG"
  • nodejs you can check whether you have installed node on your machine by using node -v which outputs "v10.0" or something
  • socket.io

Installation

You can clone repository using following git command

git clone https://github.com/lakshmajim/larasocket.git

or you can directly download the zip and move to your local repository from Github

do composer install

composer install

migrate all tables

php artisan migrate

setup .env file

DB_HOST=HOST_NAME DB_DATABASE=DATABASE_NAME DB_USERNAME=DB_USERNAME DB_PASSWORD=DB_PASSWORD

Start Redis

redis-server

Start server.js

$ cd nodejs

$nodejs server.js


That's it

Getting it to work!

Open browser

point url to

localhost/larasocket/public/home/

Here You will be redirected to Login page .Just click on register and login .Similarly open another browser and register with different user and login.Hooray!.Got it??


Screen shots