It looks like React, many concepts sounds familiar. I have a question: Is it possibile to update the URL params to sync counter state with that? And how to resolve the state of UI based on URL.
Basically livewire is replacing controllers right?? And i think livewire is much more compatible than rests ... Love your vids im learning live wire from your vids and its amazing 🎉
Thank you for watching. Yes, you can use models inside the components as well; almost anything you can do in controllers, you can do in livewire as well. I'm uploading a new video soon on building a search bar using Livewire, which will use models.
Performance would be very similar to if you where to perform ajax requests in the background. However, you should only use livewire when you need interactive components that need data from the backend or perform a backend task. In other cases maybe can use alpine js for faster realtime performance
If you are having any issues with vite, it's very likely not livewire related since views and blade files in livewire work exactly same as in laravel itself . I may make a video covering vite next week and provide an example with livewire too.
@@yelocode may i know converting vite means get rid of using vite ? or we should use it because laravel is going to use it in future as i think, and please i would appreciate if you make a video how to use it along with bootstrap and vite not with tailwind , i also followed your instructions here but still wire:navigate not working and it is refreshing page , would you advice me, i noticed that localhost/livewire/livewire.js?id=578b80d0 not found with error code 404 altough i set my app_url in .env correctly matching exactly and it works after i have added this to web.php Livewire::setScriptRoute(function ($handle) { return Route::get('/blog/livewire/livewire.js', $handle); });, is there a way to fix it without adding those lines
Laravel used to use webpack in older versions, but since v9 it's switched to vite, so from now on we have to use vite if you want to bundle your assets. For sure I will make a video covering Vite. On version 2 of livewire you could set an asset_url config to fix this but on livewire 3 the only solution is the one you have done yourself. However, this issue only applies if your application is in a subdirectory like in your situation.
@codingflick may I know what do you mean in a subdirectory, If you mean htdocs and public folder I did move htaccess and index outside , another solution to use hosts file in Windows and apache host so I make a direct access to web app or site, so I can figure out from what you said that what I did to fix assets location is the only way or livewire3
From your code it seems like you have your laravel app inside a /blog folder "/blog/livewire/livewire.js'" thats what I meant by sub directory. Yes if you want a php/laravel fix, your solution is the only way right now. But if you want to use host file or apache that one is also possible but depends on your webserver.
If I may ask are you working for laravel.
Cause this is like the best laravel channel on UA-cam . IMO🔥
Thank you for the kind words. No, I don't work for the laravel team.
Great video, a crash course won't be bad where we can dive into more basic
Thank you.
I'm currently recording a series on livewire, will upload a long format crash course video in the next few days, hopefully.
It looks like React, many concepts sounds familiar. I have a question: Is it possibile to update the URL params to sync counter state with that? And how to resolve the state of UI based on URL.
Thanks a lot,
Please could you share the settings.json file for your VScode,
Or just the name of the theme used in this video?
Well, pretty clear )
what is your extension for edit the icon in vscode?
It's part of the theme I'm using, it's called monokai pro theme monokai.pro/vscode
Basically livewire is replacing controllers right?? And i think livewire is much more compatible than rests ... Love your vids im learning live wire from your vids and its amazing 🎉
Good video
Thanks for watching.
First of all, amazing video bro! But I have a question, can you use laravel models inside the livewire component? Sorry I'm new to this.
Thank you for watching.
Yes, you can use models inside the components as well; almost anything you can do in controllers, you can do in livewire as well.
I'm uploading a new video soon on building a search bar using Livewire, which will use models.
@@yelocode thank you for responding and looking forward to that upcoming video!
The search bar video is out : ua-cam.com/video/vSOvVLSUN74/v-deo.html
Does it work on slow networks?
Performance would be very similar to if you where to perform ajax requests in the background. However, you should only use livewire when you need interactive components that need data from the backend or perform a backend task. In other cases maybe can use alpine js for faster realtime performance
thats so easy may you explain how to do it along with ui bootstrap and vite , because it is totally screwed up when we use vite
If you are having any issues with vite, it's very likely not livewire related since views and blade files in livewire work exactly same as in laravel itself . I may make a video covering vite next week and provide an example with livewire too.
@@yelocode may i know converting vite means get rid of using vite ? or we should use it because laravel is going to use it in future as i think, and please i would appreciate if you make a video how to use it along with bootstrap and vite not with tailwind
, i also followed your instructions here but still wire:navigate not working and it is refreshing page , would you advice me, i noticed that localhost/livewire/livewire.js?id=578b80d0 not found with error code 404 altough i set my app_url in .env correctly matching exactly and it works after i have added this to web.php Livewire::setScriptRoute(function ($handle) {
return Route::get('/blog/livewire/livewire.js', $handle);
});, is there a way to fix it without adding those lines
Laravel used to use webpack in older versions, but since v9 it's switched to vite, so from now on we have to use vite if you want to bundle your assets.
For sure I will make a video covering Vite.
On version 2 of livewire you could set an asset_url config to fix this but on livewire 3 the only solution is the one you have done yourself. However, this issue only applies if your application is in a subdirectory like in your situation.
@codingflick may I know what do you mean in a subdirectory, If you mean htdocs and public folder I did move htaccess and index outside , another solution to use hosts file in Windows and apache host so I make a direct access to web app or site, so I can figure out from what you said that what I did to fix assets location is the only way or livewire3
From your code it seems like you have your laravel app inside a /blog folder "/blog/livewire/livewire.js'" thats what I meant by sub directory.
Yes if you want a php/laravel fix, your solution is the only way right now. But if you want to use host file or apache that one is also possible but depends on your webserver.
Yor Ack cent souwnd verry verry Iranian 🇮🇷 my een ter net espid iz eslo