Great job man. Been using livewire for a few years now took me a bit to also figure out exactly when to use which, especially the render method because it re-computes at every single refresh making it not the best place to fetch data from. I always try to not place anything in the render method if possible unless its absolutely required for this reason.
It's definitely helpful to know all of these things so that way you can decide when you need data to be "fresh". So it's nice to be conscious of when you're making a ton of database queries like you said. :) If I'm having a CRUD setup where I want to refetch a list of items (much like a TODO list), after something has been added, having it in the Render is fantastic for that. But otherwise, it's probably not best, like you said. ☺️ -Josh
Thanks for this great video. But I have a question: if I use livewire volt using functions api, and I want to populate a table, what does it look like?
It's definitely possible! You just have to use some Alpine to interact with the view window. I would check out a blog post like this to get some tips. :) apexcode.dev/blog/infinite-scroll-with-laravel-and-livewire -Josh
@@LaravelPHP Nice. Just like what I wanted. How about some events that's being trigger inside a PostObserver created Example. Window 1 created a new post Window 2 has a Post List that's being paginated. I can't wrapped up my head how to add the event data that I received and add it in the Post List. Do you have any reference that I could take a look at? Thank you so much.
if i do something like this with alipine js, will it get updated value of entangled livewire variable Livewire: public $pageState = null; public function mount($state = null){ $this->pageState = $state; } Blade: now will currentPageState have updated value or null ?
This... is confusing. I had an interest in modern PHP... and so, that kind of implies the Laravel framework... so I watched some videos on the different aspects of the framework. Good night, is this a rabbit hole full of rabbit holes. So with Laravel you can go with good ole server rendered or you can go with a JS frontend with inertia. Or you can use Livewire... but .. would that be Livewire proper? or Livewire volt (classes) or Livewire volt (functional).... holy cow...... I don't think I have enough free time to tackle this. I just don't have the mental bandwidth to approach it.
Just select the one you feel most comfortable why are you trying to learn everything at once????? Laravel is the backend and the others are for frontend. So if you used react of other js libs before choose inertia if not, go with livewire its simple you dont have to learn everything thats not laravel
Please give us more videos with Josh on this channel! Love his content and style :)
Thanks for watching Robert! I'm glad I get to be a part of the team. :)
-Josh
Please 🙏 🙏🙏, I completely agree, his style is 👌
Finally someone who explained it right. Thank you
Thank you for this great video. I use Livewire in all my projects and it's amazing how I keep learning something new everyday.
It's really such a wonderful tool!
-Josh
Great video Josh, took me a while to figure out computed properties. Thank you for the refresher :D
So glad that it was helpful! I appreciate the support. :)
-Josh
Great job man. Been using livewire for a few years now took me a bit to also figure out exactly when to use which, especially the render method because it re-computes at every single refresh making it not the best place to fetch data from. I always try to not place anything in the render method if possible unless its absolutely required for this reason.
It's definitely helpful to know all of these things so that way you can decide when you need data to be "fresh". So it's nice to be conscious of when you're making a ton of database queries like you said. :)
If I'm having a CRUD setup where I want to refetch a list of items (much like a TODO list), after something has been added, having it in the Render is fantastic for that. But otherwise, it's probably not best, like you said. ☺️
-Josh
life saving video. Thank you josh
Thank you for watching. I'm glad it helped! :)
-Josh
Thanks for this great video. But I have a question: if I use livewire volt using functions api, and I want to populate a table, what does it look like?
I don't know if I fully understand what you're saying, but that should be the with() function in Livewire Volt functional API.
-Josh
Is there a way for computed and pagination property to have something like a loadMore?
It's definitely possible! You just have to use some Alpine to interact with the view window. I would check out a blog post like this to get some tips. :)
apexcode.dev/blog/infinite-scroll-with-laravel-and-livewire
-Josh
@@LaravelPHP Nice. Just like what I wanted.
How about some events that's being trigger inside a PostObserver created
Example. Window 1 created a new post
Window 2 has a Post List that's being paginated.
I can't wrapped up my head how to add the event data that I received and add it in the Post List. Do you have any reference that I could take a look at? Thank you so much.
What is the name of the extensions for tailwind classes that you use?
Thanks for watching! That is the Tailwind Fold extension for VSCode. It's something new I found. :)
-Josh
Hello, what is the name of the font and theme you use? Thank you
This is the Dank Mono font with Catppuccin Frappe theme. :)
-Josh
@@LaravelPHPthank you :)
if i do something like this with alipine js, will it get updated value of entangled livewire variable
Livewire:
public $pageState = null;
public function mount($state = null){
$this->pageState = $state;
}
Blade:
now will currentPageState have updated value or null ?
Livewire not having slots 😢
Awesome.
Thank you! :)
-Josh
Thanks Josh ^_^
Thank YOU for watching!
-Josh
This... is confusing. I had an interest in modern PHP... and so, that kind of implies the Laravel framework... so I watched some videos on the different aspects of the framework. Good night, is this a rabbit hole full of rabbit holes. So with Laravel you can go with good ole server rendered or you can go with a JS frontend with inertia. Or you can use Livewire... but .. would that be Livewire proper? or Livewire volt (classes) or Livewire volt (functional).... holy cow...... I don't think I have enough free time to tackle this. I just don't have the mental bandwidth to approach it.
Just select the one you feel most comfortable why are you trying to learn everything at once????? Laravel is the backend and the others are for frontend. So if you used react of other js libs before choose inertia if not, go with livewire its simple you dont have to learn everything thats not laravel
Create some video about protected listeners, dispatch for new livewire developers.
Good notes! We will add it to the list. :)
-Josh
thanks
Thank you for watching! :)
-Josh
Wire:Snapshot need a video plz plz