Laravel real-time chat application

Laravel real-time chat application


Published at - Aug 13, 2021

Laravel Realtime Chat
Build Status Code Climate

A realtime chat sample written in Laravel 4.2 + Redis + Node.js + Socket.io.

Um exemplo de chat realtime escrito em Laravel 4.2 + Redis Node.js + Socket.io (instruções somente em inglês).

Live example available at: http://chat.guilhermeslk.com.br 🙂

Requirements Laravel 4.2 MySQL Redis Node.js NPM

How to install

Step 1: Clone this repo
$ git clone https://github.com/guilhermeslk/laravel-realtime-chat.git
Step 2: Install composer packages
$ cd laravel-realtime-chat
$ composer install
Step 3: Configure Database
Edit your database.php to match your local database settings.

'connections' => array(

    'mysql' => array(
        'driver'    => 'mysql',
        'host'      => '<HOST>',
        'database'  => '<DATABASE>',
        'username'  => '<USERNAME>',
        'password'  => '<PASSWORD>',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ),

Step 4: Migrate & Populate Database
Run these commands to create and populate your database:

$ php artisan migrate
$ php artisan db:seed
Step 5: Install NPM dependencies
CD into the nodejs folder and run npm install in order to have the all dependencies installed.

$ cd nodejs
$ npm install
Step 6: Run PHP’s built-in development server
$ cd ..
$ php artisan serve
Step 7: Start Redis Server
$ redis-server
Step 8: Start the “Realtime” server (nodejs/server.js)
$ ./realtime.sh
That’s it! Now you should be ready to go!





About author

Harendra
Harendra Kanojiya

Hello, I am Harendra Kumar Kanojiya - Owner of this website and a Fullstack web developer. I have expertise in full-stack web development using Angular, PHP, Node JS, Python, Laravel, Codeigniter and, Other web technologies. I also love to write blogs on the latest web technology to keep me and others updated. Thank you for reading the articles.



Follow Us

Follow us on facebook Click Here

Facebook QR
Scan from mobile
Join our telegram channel Click Here
Telegram QR
Scan from mobile