Laravel Checklister. Part 18/29: Count Tasks on Sidebar with Livewire

preview_player
Показать описание
Today we're doing something quite interesting - updating the menu sidebar to calculate all/completed tasks, and transform it into a Livewire component to be auto-updated.

- - - - -
Support the channel by checking out our products:
Рекомендации по теме
Комментарии
Автор

nice video... not sure if it's a Bug or editing related.. after around 8:10 mark, `Push Code to github` totals jumps back to 2/3 when you click on the new Checklist 1 group.

jamiepage
Автор

Hi sir, Great video as always. I have a question about recalculating tasks, you implemented ++ in the method but what if the user unchecks the task? Or the user clicks again on task complete radio button, which again fire the method complete_task($task_id) and then emit the event which will increment the count on sidebar.

abdul-rehman
Автор

Hm I have a question not related to the video but I couldn't find any other way to reach for you.
So I have an app where I got 3 models (Model1, Model2, Model3). I have a ManyToMany relationship between Model1 & Model2. I decided to use a custom intermediate table model for the pivot table named ModelPivot that need to extend the Pivot class.
I need this pivot model to also have a relationship with my Model3 (for example OneToMany).
However since the ModelPivot Class extends the Pivot class from Laravel framework, the ModelPivot is not capable for resolving relationships. What do I do?😐

kvazaios
Автор

You are great sir next please do a video in a one to one chat app for

shocchosolutions
Автор

HI. I am a daily viewer of your channel. I am using your roles and permission system on my project. but I am using multi auth using guard for the separate user and admin session. Because I don't want to login as admin in the user front end. everything is fine. but it giving forbidden error with gate::denies() in the controller. I think it is coming for a guard. How do I check gate ability with auth guard ?? any method for it? or a different method for verifying this situation?

fftfaisal
Автор

Why all bussness logic located at controllers ? Why you not created one more layer as "service" emaple and separate logic?

germanigortsev