Thanks to visit codestin.com
Credit goes to github.com

Skip to content

anycable/larachat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Chat Demo

A minimal real-time chat application built with Laravel that can use either Laravel Reverb or AnyCable for WebSocket broadcasting.

This project started as an AI-generated fork of our Next.js demo.

Features real-time messaging with session-based usernames and message persistence.

Running locally

First, install PHP dependencies:

composer install

Install Node.js dependencies:

npm install

Create the database and run migrations:

touch database/database.sqlite
php artisan migrate

Start the development server (includes Laravel server, Reverb WebSocket server, Vite, and background processes):

composer run dev

You can open the app in your browser at http://localhost:8000.

The default command runs a Laravel Reverb WebSocket server. You can also run this app using AnyCable as a WebSocket server:

composer run dev:anycable

The only difference is the server command: php artisan anycable:server instead of php artisan reverb:start. The anycable:server command is provided by the anycable-laravel package. But there is more.

You can also go AnyCable full mode (and not just Pusher compatibility) and switch the broadcaster to "anycable". In your .env file:

BROADCAST_CONNECTION=anycable

Now, launch the app using the same composer run dev:anycable command and you'll see it speaking AnyCable (if you open your browser DevTools). This gives you all the AnyCable features such as reliable streams and more.

What's included

  • Real-time chat messaging with Laravel Reverb w/ typing indicators and presence info
  • Session-based username system
  • Message persistence with SQLite
  • React frontend with Inertia.js
  • Tailwind CSS for styling

About

Yet another demo chat app but this time with Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published