Giter Site home page Giter Site logo

resourcemode / laravelratchetchat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mochetts/laravuetchetchat

0.0 0.0 0.0 404 KB

A basic integration between Laravel 5 and Ratchet web sockets API. Laravel 5 Social authentication available as well!

PHP 98.96% JavaScript 0.61% ApacheConf 0.43%

laravelratchetchat's Introduction

LaravelRatchet Chat

"Laravel is a web application framework with expressive, elegant syntax... 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."

"Ratchet is a loosely coupled PHP library providing developers with tools to create real time, bi-directional applications between clients and servers over WebSockets. This is not your Grandfather's Internet."

Official Documentation

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

Documentation for ratchet can be found on the Ratchet website.

Description

The idea is to integrate Ratchet web sockets with a Laravel 5 simple application and implement a chat that uses web sockets.

This repo also showcases how to do the whole cicle for social authentication with laravel 5 (which is kind of a neat feature). I only used facebook login as example, but it's quite easy to add new authentication methods.

Requirements

  1. Composer

  2. Database server (I use mysql)

Setup guide

  1. Clone repo

  2. Standing on repo folder, run "composer install" from a terminal.

  3. Standing on repo folder, run "composer update" from a terminal

  4. If you want to test facebook login with your own app, go to config/services.php and change the facebook credentials and use your own.

  5. Add a virtual host with ServerName "chat.dev" (or use whatever server name you like). This steps has more steps within, so please search on google how to add a virtual host.

  6. On a terminal console navigate to project root run command "chmod -R 777 storage"

  7. Rename .env.example file (located at root structure) to be .env only and update your database credentials. (Note that a database server is needed to run this app)

  8. On a terminal console navigate to project root run command "php artisan migrate:install"

  9. On a terminal console navigate to project root run command "php artisan migrate"

  10. On a terminal console navigate to project root run command "php artisan chat:serve" to start the chat server (localhost on port 9090)

  11. Whohaa! You'r done! Open browser and enter url http://chat.dev, login and happy chatting!

Contributing

Thank you for considering contributing to this repository! Any contribution is welcomed always having the "spread the knowledge" in mind.

Evolution comes after sharing knowledge.

License

The code under this repository is open-sourced software licensed under the MIT license

Demo

http://chat.designitgmbh.de/

Thanks!

laravelratchetchat's People

Contributors

lotuashvili avatar mochetts 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.