Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Reactive Laravel - Laravel meetup Groningen

403 views

Published on

Presentation about websockets for Laravel ( Echo ) .

Published in: Engineering
  • Be the first to comment

Reactive Laravel - Laravel meetup Groningen

  1. 1. LARAVELReactive Development
  2. 2. Jasper Staats Full-Stack Developer
  3. 3. REACTIVE
  4. 4. WEBSOCKETS
  5. 5. DATA-FLOW
  6. 6. EVENTS IN LARAVEL
  7. 7. Maak het event aan via Artisan Resultaat
  8. 8. AppProvidersAppServiceProvider AppUser
  9. 9. ECHO
  10. 10. OUDE METHODE Server Node.js
  11. 11. NIEUWE METHODE
  12. 12. IMPLEMENTATIE Vereisten - Mac - Composer - Node.js ( NPM ) - Redis lokaal geïnstalleerd ( Mac = brew install redis ) - Laravel 5.4 - PHP 7
  13. 13. IMPLEMENTATIE
  14. 14. WIJZIGINGEN
  15. 15. WIJZIGINGEN (2) Authenticatie voor private-channels (routes/channels.php) laravel-echo-server start
  16. 16. UE.JS viewsapp.blade.php resources/js/bootstrap.js resources/js/app.js
  17. 17. RESULTAAT
  18. 18. CHANNELS PUBLIC PRIVATE PRESENCE
  19. 19. PUBLIC Everyone can subscribe and can see this information Mostly general announcements.
 No direct authentication from back and front-end
  20. 20. PRIVATE meaning the frontend has to authenticate the user against a backend and then assure that the user has permissions to subscribe to the given channel
  21. 21. PRESENCE which doesn't allow for sending messages and instead just notifies that a user is "present" in the channel or not.
  22. 22. API
  23. 23. WATERMELON DEMO
  24. 24. SOCKET.IO MOGELIJKHEDEN
  25. 25. VRAGEN?

×