Category: Laravel, PHP

I’m assuming you has simple level to know how to use routes, views in laravel People say that’s it’s “ so advanced” but we are going to make it so easy for you.

First you need laravel installed in your system: Now you need install curl to get composer and update your packages: Now get composer: And finally you need move composer to phar: It’s the big moment: And create your project: Yes buddy deploy your first project oppening terminal, when you input the next code don’t close the terminal, for future we are going to use Homestead: And enter to watch what you has: Okay, the next step it’s make 2 routes to get your simulator and the page to deploy that, to do that we need create controller first: Okay let’s do it, in your “routes/web.php” delete the exists routes and put: In your “RealTimeController” create the next functions to show views content: The next step it’s the probbally the most important we are going to create PusherController but first you need create a free Pusher account at https://pusher.com/signup then login to your dashboard and create an app. When you make it you can do the next step, it’s simple first create controller named “PusherController”: Install the dependencies required for pusher: And put your credentials inside .env file localated in the root from your project: *Check your “config/broadcasting.php”: Well, now go back to web.php and put this inside: Nice my friend, we are need to create function “sendNotification” inside “PusherController” and put this in the top “use Pusher\Pusher;”, let go to see controller content: In this block we are put the credentials from you pusher account, when you put it the next step it’s sending the message with your custom notify channel and event name.

Read the next pages to understand all we are using here: Nice, right now you have advanced pusher and laravel configuration to make something cool and incredible, let me show you how to use this.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners