Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Building a realtime dashboard with Laravel Livewire (PHPKonf)
Freek Van der Herten
December 12, 2020
Programming
0
290
Building a realtime dashboard with Laravel Livewire (PHPKonf)
Freek Van der Herten
December 12, 2020
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
freekmurze
0
89
freekmurze
1
380
freekmurze
1
210
freekmurze
0
360
freekmurze
0
120
freekmurze
1
330
freekmurze
0
320
freekmurze
0
100
freekmurze
0
48
Other Decks in Programming
See All in Programming
shinnoki
0
800
ryosogawa
0
100
drumato
1
260
daipresents
0
360
karosuwindam
0
120
hr01
1
4.4k
daiki_0816
0
190
shiba6v
0
210
timeseriesfr
0
150
jschaedl
2
110
dora1998
0
180
manfredsteyer
PRO
1
140
Featured
See All Featured
phodgson
88
4k
morganepeng
21
1.3k
chriscoyier
146
20k
kneath
220
15k
mongodb
23
3.9k
bkeepers
PRO
409
58k
bermonpainter
343
26k
reverentgeek
167
7.3k
addyosmani
312
21k
ddemaree
273
31k
eitanlees
116
10k
3n
163
22k
Transcript
Building a real time dashboard with Laravel & Livewire
About me Freek Van der Herten Partner & developer at
SPATIE @freekmurze freek.dev spatie.be/prodcuts ohdear.app f l areapp.io
Open source ± 300 packages on Packagist ± 105 000
000 downloads total ± 5 500 000 downloads a month
https://spatie.be/open-source
https://spatie.be/open-source
Our dashboard
None
None
None
None
None
None
Introducing Laravel Dashboard
Laravel Dashboard A free open source package Takes care of
positioning of tiles, and state Tiles themselves are separate packages Livewire components
Livewire Made by Caleb Porzio Server rendered partials No /
minimal JavaScript knowledge necessary Refresh through polling laravel-livewire.com
Demo
Comparing WebSockets/Vue to Livewire
Our previous dashboard WebSockets to transmit new data Tiles rendered
with Vue A single Laravel app
WebSockets/Vue + realtime + no meaningful extra load when connecting
client - tech stack more complicated, WebSockets server needed - potentially display old data - build proces
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)
In closing
Laravel Dashboard Easy to use package Set up a dashboard
in no time Extensive documentation docs.spatie.be/laravel-dashboard
One more thing…
spatie.be/videos/laravel-package-training
Laravel Package Training Learn to build framework agnostic PHP /
Laravel packages Best practices GitHub Actions Package source dives 4 hours of quality content
Discount spatie.be/products?referrer=phpkonf 20% discount
Thank you! freek.dev @freekmurze