Thank you so much. An easy to understand approach to CRUD. I can follow it. And at each stage I have a working application. Far better than some of the other examples I tried on the web (some of those miss a small item or other, and their example fails - difficult to solve for a beginner).
I got a lot of pointers from your video which is extremely useful and well crafted content. Thanks for this and this series. Your channel is also full of great content. I'm going to look at sweet alerts as you suggest. The classic todo with other platforms often leave out persistence as an exercise for the user but Laravel does this out of the box if you use sqlite or sail or both and of course you cover all this and more.
Thank you for the tutorial. I have been trying to do it but your method is a lot more simple, readable and easy to understand. My code look so messy lmao
I value a lot the effort put in this kind of frameworks, but I miss some feedback for beginner errors. In this example , I forgot to add the method like this '
Super awesome! Easy to follow since content is given clearly and objectively! Thank You! I am new to Laravel, and I am already in love with this powerful framwwork, and now learning on how to user livewire with blade, things are really getting interesting ! thanks once again!
it was a greate video to learn some basics of livewire, i think you should create a playlist creating a complete CRM type admin pannel where u get mouch more thing to cover. i could not find any good video for that . Thanks
Thanks for the video, help me so much! 33:51 if you use model binding, you should pass the parameter like this, Update because mine is not working, with that work like a charm 40:54 if you use model bindings, then you won't get an error of 500 it should not be error 500, but 404, that's more logical because the data is not found its 404 not found,
Thank you for watching. Yes in the video I didn't use the model binding for the update, thanks for pointing that out for people who want to use model binding. Yea I agree on the 404 error findOrFail might also give same results but model binding is a lot cleaner.
Great job. I have to report an issue search problem with pagination If I choose not the first page and try to search, the result was not what one would expect. While the list may appear empty, I have to click on the first page for results to appear
Thank you for reporting this. Great catch . An easy fix would be to reset to page 1 when $search property is updated. Livewire has hook functions to get notified of property updates. public function updatedSearch(){ $this->resetPage(); } Adding a method like above to the component should help fix it. Thank you for watching.
@@yelocode thank you, just i have some question, livewire can replace angular or react. can i do complex project with livewire. can work like any project developped by react or angular i spok about performance , diffrence og performance when return json data to handle it in frontend and handle dta in backend and return view to frontend, or livewire just for small project.
Livewire is not a 1 to 1 replacement for Vue or React. It's main use case is for websites with crud like elements that need to be interactive, for more complex projects you will have a really hard time using livewire or just impossible to build some behaviours unless you write javascript on the side. In terms of performance and website size, livewire can scale well as long as you use the best practices and it's used in big sites too. If you have a very complex front end app, you might want to take a look at inertia js.
16:10 -- I'm not sure if it's supposed to be this way, but it worked fine for me without adding "use WithPagination". Maybe it's supported in Component by default now, I dunno.
This series is brilliant - I've nearly completed a basic single-value CRUD based on this and it works great... except... I want all my ToDos to be completely unique. Adding a new Todo is fine, and so is editing - but the edit fails if I try and validate it as unique because it thinks editingToDoName is a column in the db. Any thoughts on the best way to get around this? Can't wait to get on with the rest of the series!
Thank You.I have a little problem that i click edit button and i remove default value and then i click cancel button, the validation message is show.why?.i try to fix this bug but i can't
Thanks for watching. This is a new change in recent updates, it scrolls to top by default but you can disable it using a code like below : {{ $todos->links(data: ['scrollTo' => false]) }}
I don't know why, but when I got to the last part my "create" didn't work anymore! Create this seems not work anymore, i have tryied so many things, and nothing make works again! someone has some provavel causes?
Hey Yelo, am really grateful for all the tall stack tutorials. What could cause livewire component not to auto refresh after data being submitted or updated? That data will not show until I refresh manually. Please 🙏 help on this.
No it's gonna be the same. I just use @include in the video since more people are familiar with it. But you can use which ever you prefer. I myself use x-component on my personal project.
Hello is possible to make $todos as a public properties and set it on mount? I try like this but get error: public ?Todo $todos; public function mount():void { $this->todos = // set todos with pagination and search }
Hi Martin, it's pretty nice to see such well-made and easy to follow tutorial videos. Keep up the good work! I am pretty new to Livewire and I can barely find any info online on the issue that I've been facing, related to the editing part in a CRUD: I have some bound to wire:models. Whenever I render the edit form, those fields never preload the dates from the database. The datepicker would show today's date by default although there is a date passed by wire:model back into the input field. I simply cannot figure out how to make those show the dates coming from the model. I tried "value=" field of course, as well as some nasty javascript ways to turn the field type to date only on focus. Any idea how to make a date input show the data in an editing situation? Livewire 3, Jetstream, Laravel 10 Have a nice day!
Thanks for watching. For type="date" inputs, you will have to ensure your property value is in the "Y-m-d" format. You can do something like below in your mount function or where you are setting the initial values on Edit: public function mount() { $this->testDate = Carbon::now()->addDays(-3000)->format('Y-m-d'); } Hope this can help solve your issue, please do let me know if you found some other or easier solution , since i think it might be a common issue.
That's embarassing! Was so focused on making this date show that I did not realize that the data I am using which I seeded (from a different PHP application) was in many different formats, yet I did not convert it to some universal format / pass it through Carbon (some are dd/mm/YYYY, others are YYYY/mm/dd and even dd.mm.YYYY). Glad I asked since it saved me a lot of time haha.. I was about to make a custom livewire x-date-input + jQuery. 😂 The first 100+ entries in the database were Y-m-d and while editing through livewire I was always selecting the last entries in the db, followed by a few hours of debugging it as if it was AJAX. My date input fields are dd/mm/YYYY (due to browser / location I'm guessing) to make it more confusing... Thanks again and keep up the good work! @@yelocode
great tutorial, easy to follow. I use herd with breeze volt stack, although no volt components. at the end of the video my try catch returns a 404, not the exception. public function delete($todoId) { try { Todo::findOrFail($todoId)->delete(); } catch (Exception $e) { session()->flash('error', 'Failed to delete todo!'); return; } } Any ideas?
@@vanjasavic3712 That did not work for me still getting 404. If I dd($todoId) in try, it does return correct id. U hv a second (original) catch block included. I tried with that and also with removing the original catch block ??
If you type the value manually in the input text box, then Livewire is unable to update the value dynamical. We are using Livewire 3.0 for this example. Livewire Component
You don't need 'value="{{ $count }}"', can remove it from the input. wire:model="count" automatically updates the value. If you like the input value to also update the h1 tag, switch wire:model to this wire:model.live. It will also update the h1 tag
Hello, I have a problem, the $this->reset('name') does not work to me, after creating a user the value inside the textbox is still there, but when i click the create again it applies the validation "The name field is required." even tho the uncleared value is still there.
Interesting, I'm unable to replicate this on my side unfortunately. This might be because of how livewire renders changes to the page livewire.laravel.com/docs/morphing. If you have your code on github I can take a look and find the issue if you want.
Interesting, was livewire successfully installed? Maybe you got an error during the installation. I had another viewer have installation issues and they used composer require livewire/livewire "^3.0.0@beta" to fix it. adding an extra .0 to the "^3.0@beta"
I stumbled on a bug while following the tutorial. When you click on the update button and the validation fails, then you select another todo to edit, the same validation error message pops up
If you have it deployed on a server, there should be some slight delay, basically the time it takes for the requests to reach your server and back. Some delay is normal. On local development, it should be instant, unless you are performing a computationally expensive task or db operation.
Use for implementing confirmation tab when deleting.
Thanks Buddy, Just used it and worked. gonna implement it in every major action from now.
instead using;
@if ($todo->completed)
@else
@endif
use the syntax of laravel as;
completed)>
Great Tip, Thanks for sharing.
Thank you so much. An easy to understand approach to CRUD. I can follow it. And at each stage I have a working application. Far better than some of the other examples I tried on the web (some of those miss a small item or other, and their example fails - difficult to solve for a beginner).
Thanks for watching. Glad the video was helpful.
I got a lot of pointers from your video which is extremely useful and well crafted content. Thanks for this and this series. Your channel is also full of great content. I'm going to look at sweet alerts as you suggest. The classic todo with other platforms often leave out persistence as an exercise for the user but Laravel does this out of the box if you use sqlite or sail or both and of course you cover all this and more.
nice, now i have a very cool todo app that runs with livewire 3 , thank you.
Great to hear! Thank you for watching.
Thank you. Very easy to grasp and implement. I will be building more projects with Livewire now.
Great to hear. Thank you for watching.
Thank you so much you're doing the best work
Thank you for the support.
Thank you for the tutorial. I have been trying to do it but your method is a lot more simple, readable and easy to understand. My code look so messy lmao
Thanks for watching, glad the video was helpful.
I value a lot the effort put in this kind of frameworks, but I miss some feedback for beginner errors. In this example , I forgot to add the method like this '
Like your videos and the way you explain the stuff.
Tanks for your efforts.!
Thanks for watching
Super awesome! Easy to follow since content is given clearly and objectively! Thank You! I am new to Laravel, and I am already in love with this powerful framwwork, and now learning on how to user livewire with blade, things are really getting interesting ! thanks once again!
just i can say u are great
Thanks for watching.
Bro, you are talented! I thank you for your amazing courses. They helped me a lot
Thanks for watching. Happy to hear that.
it was a greate video to learn some basics of livewire, i think you should create a playlist creating a complete CRM type admin pannel where u get mouch more thing to cover. i could not find any good video for that . Thanks
Thank you for watching. Will put that on the list of videos to make.
Thanks for the video, help me so much!
33:51 if you use model binding, you should pass the parameter like this,
Update
because mine is not working, with that work like a charm
40:54 if you use model bindings, then you won't get an error of 500 it should not be error 500, but 404, that's more logical because the data is not found its 404 not found,
Thank you for watching.
Yes in the video I didn't use the model binding for the update, thanks for pointing that out for people who want to use model binding.
Yea I agree on the 404 error findOrFail might also give same results but model binding is a lot cleaner.
Great job.
I have to report an issue
search problem with pagination
If I choose not the first page and try to search, the result was not what one would expect.
While the list may appear empty, I have to click on the first page for results to appear
Thank you for reporting this.
Great catch . An easy fix would be to reset to page 1 when $search property is updated. Livewire has hook functions to get notified of property updates.
public function updatedSearch(){
$this->resetPage();
}
Adding a method like above to the component should help fix it.
Thank you for watching.
thankyou!!!! great video thank thankyou !!!! youre amazing!
Thanks for watching.
great video
Thanks!
liked and subscribed. thank you sir
Great tutorial!
Thank you!
Great job mate
Thanks :)
The code below
completed ? 'checked' : ''}} >
works as whel as
@if ($todo->completed)
@else
@endif
Looks way better, thanks for sharing man. I didn't notice this when recording the video.
completed) checked @endif />
Thanks for the useful information
Thanks for watching
Thanks
Thanks for watching
thank you so much, very helpful.
Thanks for watching. Glad it was helpful.
wow so good bro
Please also record a comprehensive course for inertiajs + vue3
Thanks for watching. Will for sure try making a vue and inertiajs course in the future.
Great job.
Thank you
@@yelocode thank you, just i have some question, livewire can replace angular or react. can i do complex project with livewire. can work like any project developped by react or angular i spok about performance , diffrence og performance when return json data to handle it in frontend and handle dta in backend and return view to frontend, or livewire just for small project.
Livewire is not a 1 to 1 replacement for Vue or React.
It's main use case is for websites with crud like elements that need to be interactive, for more complex projects you will have a really hard time using livewire or just impossible to build some behaviours unless you write javascript on the side.
In terms of performance and website size, livewire can scale well as long as you use the best practices and it's used in big sites too.
If you have a very complex front end app, you might want to take a look at inertia js.
thank you
Thanks for watching.
16:10 -- I'm not sure if it's supposed to be this way, but it worked fine for me without adding "use WithPagination". Maybe it's supported in Component by default now, I dunno.
Thank you Sir there is something left to make a video, when will that video come? how did Loading States, navigate there is more
Next video is about file uploads but will cover loading states and navigate in the next coming days,
This series is brilliant - I've nearly completed a basic single-value CRUD based on this and it works great... except...
I want all my ToDos to be completely unique. Adding a new Todo is fine, and so is editing - but the edit fails if I try and validate it as unique because it thinks editingToDoName is a column in the db. Any thoughts on the best way to get around this? Can't wait to get on with the rest of the series!
I am told that type of validation above the variable is a premium feature
I have an issue when I insert the new record for todo and the list card not update immediately and that just update after next create done.
How do you make the tasklist update/renew when creating a new task?
Thank You.I have a little problem that i click edit button and i remove default value and then i click cancel button, the validation message is show.why?.i try to fix this bug but i can't
why my button on livewire appears as if it were a link, it does not appear as a button structure, how to solve
Thanks for this great video! I have a small issue about pagination. Page is scrolling back to top after pagination. Any solution for this?
Thanks for watching.
This is a new change in recent updates, it scrolls to top by default but you can disable it using a code like below :
{{ $todos->links(data: ['scrollTo' => false]) }}
@@yelocode Thank you so much!
I don't know why, but when I got to the last part my "create" didn't work anymore!
Create
this seems not work anymore, i have tryied so many things, and nothing make works again!
someone has some provavel causes?
Hey Yelo, am really grateful for all the tall stack tutorials. What could cause livewire component not to auto refresh after data being submitted or updated? That data will not show until I refresh manually. Please 🙏 help on this.
we can replace @include with laravel components is there a big difference in these hikes?
for example filament 3 uses them together Livewire 3
No it's gonna be the same. I just use @include in the video since more people are familiar with it. But you can use which ever you prefer. I myself use x-component on my personal project.
@@yelocode Hi and thank you for this tutorial , it must be a laravel or livewire component to use , not just a blade file, is it?
Where is the source code link because I am only seeing index.html on the repo.
sir by following your course with wonderful content but unfortunately $this->reset() method is not working. what can be issue
Hello is possible to make $todos as a public properties and set it on mount?
I try like this but get error:
public ?Todo $todos;
public function mount():void
{
$this->todos = // set todos with pagination and search
}
Hi Martin, it's pretty nice to see such well-made and easy to follow tutorial videos. Keep up the good work!
I am pretty new to Livewire and I can barely find any info online on the issue that I've been facing, related to the editing part in a CRUD:
I have some bound to wire:models. Whenever I render the edit form, those fields never preload the dates from the database. The datepicker would show today's date by default although there is a date passed by wire:model back into the input field. I simply cannot figure out how to make those show the dates coming from the model. I tried "value=" field of course, as well as some nasty javascript ways to turn the field type to date only on focus.
Any idea how to make a date input show the data in an editing situation? Livewire 3, Jetstream, Laravel 10
Have a nice day!
Thanks for watching. For type="date" inputs, you will have to ensure your property value is in the "Y-m-d" format.
You can do something like below in your mount function or where you are setting the initial values on Edit:
public function mount()
{
$this->testDate = Carbon::now()->addDays(-3000)->format('Y-m-d');
}
Hope this can help solve your issue, please do let me know if you found some other or easier solution , since i think it might be a common issue.
That's embarassing!
Was so focused on making this date show that I did not realize that the data I am using which I seeded (from a different PHP application) was in many different formats, yet I did not convert it to some universal format / pass it through Carbon (some are dd/mm/YYYY, others are YYYY/mm/dd and even dd.mm.YYYY).
Glad I asked since it saved me a lot of time haha.. I was about to make a custom livewire x-date-input + jQuery. 😂
The first 100+ entries in the database were Y-m-d and while editing through livewire I was always selecting the last entries in the db, followed by a few hours of debugging it as if it was AJAX. My date input fields are dd/mm/YYYY (due to browser / location I'm guessing) to make it more confusing...
Thanks again and keep up the good work!
@@yelocode
great tutorial, easy to follow. I use herd with breeze volt stack, although no volt components. at the end of the video my try catch returns a 404, not the exception.
public function delete($todoId)
{
try {
Todo::findOrFail($todoId)->delete();
} catch (Exception $e) {
session()->flash('error', 'Failed to delete todo!');
return;
}
}
Any ideas?
try this
"use Illuminate\Database\Eloquent\ModelNotFoundException;
// ...
public function delete($todoId)
{
try {
Todo::findOrFail($todoId)->delete();
} catch (ModelNotFoundException $e) {
session()->flash('error', 'Todo not found!');
return;
} catch (Exception $e) {
session()->flash('error', 'Failed to delete todo!');
return;
}
}"
@@vanjasavic3712
That did not work for me still getting 404. If I dd($todoId) in try, it does return correct id. U hv a second (original) catch block included. I tried with that and also with removing the original catch block ??
Hi martin...what's plugin for VSC to autocomplete php 8 attributes and auto import that?
Hi, I use this PHP plugin : PHP Intelephense
Hi@@yelocode I already installed, but autocomplete not fired when I type # for start? What did you press to bring it up?
If you type the value manually in the input text box, then Livewire is unable to update the value dynamical.
We are using Livewire 3.0 for this example.
Livewire Component
You don't need 'value="{{ $count }}"', can remove it from the input. wire:model="count" automatically updates the value.
If you like the input value to also update the h1 tag, switch wire:model to this wire:model.live. It will also update the h1 tag
Hello, I have a problem, the $this->reset('name') does not work to me, after creating a user the value inside the textbox is still there, but when i click the create again it applies the validation "The name field is required." even tho the uncleared value is still there.
it only resets the Livewire property but does not clear the input field in the HTML.
I found an issue
if i do paginate 3 and than create data more than 3, it will render pagination 2x, how to fix that?
Do you get 6 results? or do you get 2 copies of pagination buttons?
@@yelocode 2 copies of pagination button
Interesting, I'm unable to replicate this on my side unfortunately. This might be because of how livewire renders changes to the page livewire.laravel.com/docs/morphing.
If you have your code on github I can take a look and find the issue if you want.
What is the name of your vscode theme? It's pretty cool =D
It's called Monokai Pro. I'm using the Octagon version.
php artisan livewire:make TodoList and php artisan make:livewire TodoList both are nogo. how to fix?
Can I please know what error message you get when you run them in the terminal?
@@yelocode here are no commands defined in the "livewire" namespace. and Command "make:livewire" is not defined. Did you mean one of these?
Interesting, was livewire successfully installed? Maybe you got an error during the installation.
I had another viewer have installation issues and they used composer require livewire/livewire "^3.0.0@beta" to fix it. adding an extra .0 to the "^3.0@beta"
@@yelocode ok, that did the trick, you have to have the composer require livewire/livewire "^3.0.0@beta"
@@373323 Awesome, glad that fixed the issue.
what extension do you use to give clue about the code you want to type?
The plugin is called : PHP Intelephense. It does auto suggestion as well many other useful things needed for PHP.
@@yelocode This is the second time i ask in your videos. Thank you so much. I will ask more if there are things i won't understand.
thanks brother
Thanks for watching
кнопку удаление можно сделать что-то типа
Delete
I stumbled on a bug while following the tutorial. When you click on the update button and the validation fails, then you select another todo to edit, the same validation error message pops up
thank you :)
error handling show 404 page not the message in the exception ?
Hello! Been following your tutorial and tried CRUD like yours but there seems to be delays when adding, editing and deleting, is this normal?
If you have it deployed on a server, there should be some slight delay, basically the time it takes for the requests to reach your server and back. Some delay is normal.
On local development, it should be instant, unless you are performing a computationally expensive task or db operation.
@@yelocode i see now, thanks!
Really awesome content ! Keep up the great work ! Your teaching process really easy Learning a lot ! I'm From Bangladesh. Please take Love💕
Thanks for watching. Glad the videos are helpful 💚.
very informative course thank you!!
Glad it was helpful!
i am loving every bit fo this tutorials ..keep up sir thanks
Thanks for watching 🙏
amazing tutorial
Thanks for this simple and clear turorial
Glad it was helpful!
Thank you
Thank you very much. I learn so much.
Glad to hear that! Thank you for watching.
Awesome! thank you!!!!!!!!!!!!!!
You're welcome!
Awesome 👍
Nice!
Nice
Awesome!!!!!
thank you, very clear explanation
Thank you for watching
Really awesome content ! Keep up the great work ! Learning a lot !
Thank you
This video is great, thank you for your effort to teach, hope to see you cover SPA using livewire 3.
good stuff man keep it up
Thank you
nice explanation thanks for uploading!
Bravo!!!
:)
very good turorial 👍
Glad you liked it, Thank you for watching Ivan.
Thank U
Thanks for watching
livewire 3 stable release ?
nope, they not released the stable version at moment but the beta is working absolutely good
@@alexandrepellegrino2699 i know beta version is to much good but stable release?
Stable release is out now
thanks for the series man
My pleasure!