This project is a demonstration of Laravel Broadcasting and Pusher integration for real-time communication on the back-end side. It showcases how to configure Laravel Broadcasting with Pusher to enable real-time events and notifications in Laravel applications.
The purpose of this project is to provide interns with a comprehensive understanding of Laravel Broadcasting and Pusher implementation.
Laravel@10.x - back-end framework
Pusher - Pusher
1. Clone repository from github:
git clone https://github.com/giopantsulaia/broadcast-test-laravel.git2. Run composer install in order to install all the dependencies.
composer install3.Install all the JS dependencies:
npm installand also:
npm run dev4. Copy .env from .env.example
cp .env.example .envProvide .env file all the necessary environment variables:
MYSQL:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=*
DB_USERNAME=*
DB_PASSWORD=*
after setting up .env file, execute:
php artisan key:generate5.Configure Pusher, add credentials in .env file:
PUSHER_APP_ID=*
PUSHER_APP_KEY=*
PUSHER_APP_SECRET=*
PUSHER_APP_CLUSTER=*
once you're done interacting with .env file, run
php artisan optimize:clearif you've completed getting started section, then migrating database if fairly simple process, just execute:
php artisan migrateYou can run Laravel's built-in development server by executing:
php artisan serve