The system must first have the necessary components installed: composer, git, docker. PHP version ^8.2
Commands init application:
> cd /path_to_projects
> git clone https://github.com/Igor-ad/laravel-live-chat.git
> cd ./laravel-live-chat
> cp ./.env.example ./.env
It is necessary to fill in the parameters of the environment file ./.env with the following values: DB_PASSWORD, PUSHER_APP_ID, PUSHER_APP_KEY, PUSHER_APP_SECRET,
> composer install
> ./vendor/bin/sail up
> chmod 777 -R ./storage/logs
> chmod 777 ./storage/framework/views
> php artisan key:generate
> php artisan migrate
> npm install
> npm run build
> php artisan queue:listen
- Create a public/private chat;
- Soft deletion of your own chats;
- Ability to choose your own or public chat;
- Sending and soft deleting your own chat messages;
- Smooth scrolling of the message feed when receiving a new message in the chat;
- Sending a pop-up message with an invitation to a public/private chat for the user on any page of the site;
- Collapse/expand the panel with users authorized in to the site;
- Chat status bar, which displays chat events;
- Standard profile page for changing user registration data (Breeze);
- Standard check of the user mailbox during registration;
- CSRF protection of post/delete requests.
- Number of online users in the current chat;
- User login/logout from the site;
- User entry/exit from the current chat;
- Typing the message text by the user;
- Erasing the message text by the user;
- Display the text of a message deleted by the user;
- Creation/deletion of a chat by the user;
- Clear status bar after 10 seconds.
The application has also been successfully tested with the latest version of Laravel Reverb as a WebSockets server. The settings in the .env and echo.js files need to be changed to match the Reverb server. You also need to install dependencies to work with the Reverb server.