Laravel + soketi = <3
This project demonstrates the power of soketi's WebSocket functionality in Laravel.
Installing the project
The server requires:
- Composer
- Node.js + NPM (for soketi)
- PHP 7.3+
git clone [email protected]:soketi/laravel-chat-app.git
cd laravel-chat-app
Installing the chat room app
Run the following chain commands to install the project:
composer install --ignore-platform-reqs && \
cp .env.example .env && \
touch database/database.sqlite && \
php artisan key:generate && \
php artisan migrate:fresh --seed && \
php artisan storage:link
Build the frontend assets:
npm install && npm run dev
Run the internal server to make the HTTP server accessible on http://127.0.0.1:8000
:
php artisan serve
Installing soketi
You can find multiple installation methods for soketi, but for this project we assume you already have NPM installed:
npm install -g @soketi/soketi@latest
To launch the server, open a new terminal window and let it run in the background:
soketi start
Authentication
The seeders created three accounts. All accounts can be accessed with the password secret
:
Linting the code
You can lint the code for Vue:
npm run lint
For PHP, use the CSFixer command:
vendor/bin/php-cs-fixer fix