This project is the source code of a Udemy course, you can get this course with discount coupon from here
Clone this repository
git clone [email protected]:bitfumes/real-time-single-page-forum-app.git
Go inside the directory
cd real-time-single-page-forum-app
Now install composer
composer install
Generate key on .env file
cp .env.example .env
php artisan key:generate
Go to .env file and change Broadcast drive to pusher
BROADCAST_DRIVER=pusher
and also give credentials of your pusher on .env file
PUSHER_APP_ID=xxxxxx
PUSHER_APP_KEY=xxxxxxxxxxxxxxxxxxxx
PUSHER_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxx
PUSHER_APP_CLUSTER=xxx
open bootstrap.js file and provide pusher key there also.
window.Echo = new Echo({
broadcaster: 'pusher',
key: "xxxxxxxxxxxxxxxxxxxxx",
cluster: "xxx",
encrypted: true,
...
As this project uses queue so we need to settings related to that also.
Now make changes for queue driver on .env file
QUEUE_DRIVER=database
Generate jobs table and migrate it
php artisan queue:table
php artisan migrate
Now we have jobs table, and to make system real time, we need to dispatch queued events.
So lets start queue worker for that.
php artisan queue:work
keep this running.
For any query, contact [email protected]