Thanks! Go on with the works. Your tutorial are really good but how to check if user is already followed inside user profile page? I use $this->following()->where('follower_id', $user->id)->count(); inside model, doesn't work, please help.
Hey! It's been a while since I recorded the video, but I guess you could do something like: $user->followers()->where('user_id', auth()->id())->exists() - and this will return a boolean saying if that particular user is followed by the authenticated user.
When unfollowing someone, it would be better if the person remained afterwards, but with a follow button, so that you can re-follow if you clicked the wrong one. In the example here they disappear because the whole list is re-rendered
Symfony\Component\Debug\Exception\FatalThrowableError : Call to a member funtion followings() on null [ laravel verion 5.6 ] Please help i got this error while php artisan migrate:fresh --seed
Thanks for the video. I wonder if it is possible to recreate UI similar to Reddit with Inertia where you click on the post, it opens in the modal, page URL changes, but posts list stays in the background.
Inertia is not a silver bullet, and it's not particularly good with modals: github.com/inertiajs/inertia/issues/249 (although people are working hard on it). But yes, I think the scenario you described could be recreated with Inertia - at least the part with: "I'm on a list of posts, clicking on one will bring up a modal and will give me an url I can paste in another window and load the same post modal". But once you move to the "I also need to post comments from this modal" - then, you are better off by using a regular xhr. The idea is, inertia can help (a lot), but you still have to sprinkle some xhr from time to time :)
Great video. You can also style the FOLLOWING button in such a way that when you hover the mouse the text changes to UNFOLLOW with a red background.
Please seed the DB with 500 followers and implement an infinite scroll that autoloads new data.
can you upload source code to github please?
Thanks! Go on with the works. Your tutorial are really good but how to check if user is already followed inside user profile page? I use $this->following()->where('follower_id', $user->id)->count(); inside model, doesn't work, please help.
Hey!
It's been a while since I recorded the video, but I guess you could do something like: $user->followers()->where('user_id', auth()->id())->exists() - and this will return a boolean saying if that particular user is followed by the authenticated user.
@@cdruc The code its work, thanks! I appreciate your time.
Great video Druc
hello, can you make a detailed video on inertia
progress indicators?
What font do you have installed in VisualCode? Very nice!
When unfollowing someone, it would be better if the person remained afterwards, but with a follow button, so that you can re-follow if you clicked the wrong one. In the example here they disappear because the whole list is re-rendered
Great video
How have you done the sidebar in tailwind, does it have the code somewhere or repository?
Symfony\Component\Debug\Exception\FatalThrowableError : Call to a member funtion followings() on null [ laravel verion 5.6 ] Please help i got this error while php artisan migrate:fresh --seed
Man, you're good
Thanks for the video. I wonder if it is possible to recreate UI similar to Reddit with Inertia where you click on the post, it opens in the modal, page URL changes, but posts list stays in the background.
I think twitter has the same behavior when you click on some image inside of a post.
Inertia is not a silver bullet, and it's not particularly good with modals: github.com/inertiajs/inertia/issues/249 (although people are working hard on it).
But yes, I think the scenario you described could be recreated with Inertia - at least the part with:
"I'm on a list of posts, clicking on one will bring up a modal and will give me an url I can paste in another window and load the same post modal".
But once you move to the "I also need to post comments from this modal" - then, you are better off by using a regular xhr.
The idea is, inertia can help (a lot), but you still have to sprinkle some xhr from time to time :)
can you share source code in github?