Slide 1

Slide 1 text

Building a real time dashboard with Laravel & Livewire

Slide 2

Slide 2 text

About me Freek Van der Herten Partner & developer at SPATIE @freekmurze freek.dev spatie.be/prodcuts ohdear.app f l areapp.io

Slide 3

Slide 3 text

Open source ± 300 packages on Packagist ± 105 000 000 downloads total ± 5 500 000 downloads a month

Slide 4

Slide 4 text

https://spatie.be/open-source

Slide 5

Slide 5 text

https://spatie.be/open-source

Slide 6

Slide 6 text

Our dashboard

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Introducing Laravel Dashboard

Slide 14

Slide 14 text

Laravel Dashboard A free open source package Takes care of positioning of tiles, and state Tiles themselves are separate packages Livewire components

Slide 15

Slide 15 text

Livewire Made by Caleb Porzio Server rendered partials No / minimal JavaScript knowledge necessary Refresh through polling laravel-livewire.com

Slide 16

Slide 16 text

Demo

Slide 17

Slide 17 text

Comparing WebSockets/Vue to Livewire

Slide 18

Slide 18 text

Our previous dashboard WebSockets to transmit new data Tiles rendered with Vue A single Laravel app

Slide 19

Slide 19 text

WebSockets/Vue + realtime + no meaningful extra load when connecting client - tech stack more complicated, WebSockets server needed - potentially display old data - build proces

Slide 20

Slide 20 text

Livewire + simple tech stack, just an app and a db + easy to package up tiles, only PHP knowledge needed + up to date from f i rst render - not realtime, but close - load on server increases with every user - Livewire isn’t an industry standard like WebSockets/Vue (yet)

Slide 21

Slide 21 text

In closing

Slide 22

Slide 22 text

Laravel Dashboard Easy to use package Set up a dashboard in no time Extensive documentation docs.spatie.be/laravel-dashboard

Slide 23

Slide 23 text

One more thing…

Slide 24

Slide 24 text

spatie.be/videos/laravel-package-training

Slide 25

Slide 25 text

Laravel Package Training Learn to build framework agnostic PHP / Laravel packages Best practices GitHub Actions Package source dives 4 hours of quality content

Slide 26

Slide 26 text

Discount spatie.be/products?referrer=phpkonf 20% discount

Slide 27

Slide 27 text

Thank you! freek.dev @freekmurze