PHP on the frontend! No more Javascript!

preview_player
Показать описание
Laravel Livewire allows you to write PHP on the frontend (kind of!) so you don't have to futz about with Javascript anymore (mostly!)

Follow me:

Chapters:
01:44 Installing Livewire
02:26 Updating our default views
03:28 Making a Livewire component
04:37 Adding state
05:08 Binding state
06:45 Inspecting the network tab
09:35 Calling methods
11:28 Events, nested components, file uploads
13:30 Livewire V3
Рекомендации по теме
Комментарии
Автор

Fellow Laravel content creator here, absolutely love your style of video.

You have really nice personality & charisma in this video, keep it up man!

Icodestuff
Автор

So.. every time you type something ( 5:42 ) it does a trip to the server and back?
Why is that needed? Because a developer didn't like JS?
I mean your user probably doesn't know nor care if the site is JS or PHP, but he will be surprised about how slow that site is. Especially if the server is on another continent.

XTANCE
Автор

"Have you ever had a thought..". None, I have a zero thought policy.

Even thought I don't use PHP, your videos are entertaining!

dmdboi
Автор

I've been a mobile developer for the past 10 years but PHP has a soft spot in my heart, no matter how much hate it gets. I built a little backend for a mobile app I developed for a software competition way back in 2012 (and won 3rd place!). All vanilla PHP, no frameworks. I wasn't aware of Laravel back then. I tried it here and there but my career took me elsewhere. Your videos on PHP makes me wanna learn Laravel again.

isurujn
Автор

I started watching PHP content again after 6 years of working with other languages, all because of your videos. I was surprised to see PHP added types! Also, Laravel and all of the PHP ecosystem have advanced a ton! Great content Aaron!

carloslfu
Автор

This level of advocating for a language is outstanding... PHP is simple yet powerful enough to get you on production !

ravipatelCTF
Автор

Life changing :D Great video .. thanks a lot ! *Loving PHP for 20 years now.

Rikco.
Автор

Great video!
One thing worth explaining in the counter example: Every time you click the increment button, you not only send to the server that the "increment" function should be called, but also send the entire previous state of the component in the "memo" field. First the component gets hydrated, e.g. $counter gets set to 22 or whatever the "memo" says, and then the function is applied. The backend then increments it to 23 and sends the new view out, but also the new memo which is then stored by the frontend.
Took me a day or two to figure this out. Before that, I thought some cache or db sorcery is going on.

holonaut
Автор

what is the advantage of making multiple http requests to change an input value instead of using javascript to do that ?

hamzahakoun
Автор

After each video that I watch from you, I have a big smile on my face. ❤

Автор

Another great video! Livewire is honestly so cool and magical.
Keep up the great PHP/Laravel content!

David-ngqh
Автор

I just fell in love with PHP. Thank you Aaron!

lavendercode
Автор

I've been using Livewire since version 1 and have never thought to use anything else since then, even started my first open source package for the TALL stack called tall-kit components

MrNichuya
Автор

Your style of explanation makes the topic more interesting. Great !!!

siyabdev
Автор

My only problem with the "HTML over the wire" pattern is that it makes it too easy to build applications that require too much server interactions for trivial state changes that can just as easily take place on the client entirely. This results in poor design, such as the way GitHub has to make a request just to render a markdown preview. That's why I prefer how React Server Components by design make it so you cannot, for instance, use state on a server component, forcing you to make it clientside.

TheJobCompany
Автор

i just found your channel and subbed to it. ive been using php for the past 9 years. ive known live wire for the past year but havent dared to try it. i will try this now.

raident
Автор

Did you saw PHP in a sandbox enviroment with WebAssembly?
They did that a few weeks ago.

victorpinasarnault
Автор

been waiting for Livewire v3.0 so long...
Your videos are the best. :)

khanalpride
Автор

It's a sign from the heavens..Dary and Gio had me thinking about learning PHP...Now A-A-Ron...Been thinking about this for at least 3 years (im JS loser wannabe)...

Imagined if I would have listened to myself and committed? I would be well on my dream of working from home in my pj bottoms and tshirt...

imdtap
Автор

Bro this guy talks to me like I'm a toddler and I'm here for it, love the vibes

tinpa