skip to Main Content

I am working on an api based on laravel version 5.3.

It’s going to be like Telegram api that can respond to various clients that written with android, iOS or web version(angularjs).

One thing that is an Impartible part of that kind of api is realtime operations.

According to the survey that I did there is a signalR library for ASP.NET that makes developing real-time web functionality easy for ASP.NET developers.

SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers like :

Now I wanted to know that for php and specifically Laravel, Is there a tool that is also easy to write realtime apis?

2

Answers


  1. Laravel offers broadcasting as a feature to send server-side events to clients.
    As for clients there is a javascript package which can be implemented

    You can read it up in the Laravel Docs

    Laravel Echo is a JavaScript library that makes it painless to subscribe to channels and listen for events broadcast by Laravel. You may install Echo via the NPM package manager.

    Login or Signup to reply.
  2. you can use socket.io with Redis for angular client and Laravel backend

    publish messages on redis from Laravel -> subscribe to redis in a node server and emit messages to socket io -> get messages using socket.io in angular client

    you may need to configure reverse proxy in your apache virtual host configuration to node server for all ws requests

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search