quick note for when you want to zoom in on something on your Mac: enable the assist where you can control - mousewheel to zoom in / out (not just for TablePlus, but the whole screen)
Thanks for the lessons. Few suggestions: 1. For the unfollow route more common to use a DELETE method 2. For the User->follows method instead of using a query builder we can just use "return $this->followings->contains($user);" And of course, it's better to use a Redis for those methods but I think it's not for beginners :) thanks again for your job
I agree, makes more sense to use livewire on a real world application. I'm assuming viewers of this series are not familiar with livewire. But you gave me a great idea, I might redo these at the end of the course using livewire. Thank you for watching
I personally have never implemented microsoft oauth, For google and facebook Laravel Socialite is super easy and I used it multiple times but does not support microsoft. Microsoft seems to have a tutorial on this learn.microsoft.com/en-us/graph/tutorials/php?tutorial-step=4&tabs=aad if you haven't checked it out already.
Hello Bro I got error in this section Error PHP 8.3.1 Call to a member function attach() on false public function follow(User $user) { $follower = auth()->user(); $follower->followings()->attach($user); return redirect()->route('users.show',$user->id)-with('success',"followed succesfully!"); } Can you help with that please?
Looks like an issue with your relationship definition, make sure you have the relationship defined on your User model. public function followings() { return $this->belongsToMany(User::class, 'follower_user', 'follower_id', 'user_id')->withTimestamps(); }
hello there's a small issue to be resolved in your user model your function defination rises a expection stating call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::exits() if your are using the below code which i have commented out below so to solve it you can use other intruction it works fine public function follows( User $user){ // return $this->following()->where('user_id', $user->id)->exists(); return $this->following()->where('follower_id', $this->id)->where('user_id', $user->id)->exists(); } thank you
quick note for when you want to zoom in on something on your Mac: enable the assist where you can control - mousewheel to zoom in / out (not just for TablePlus, but the whole screen)
Thanks for sharing that Daniel. Just tried it and it works like a charm, wish I known about it sooner.
Thanks for the lessons. Few suggestions:
1. For the unfollow route more common to use a DELETE method
2. For the User->follows method instead of using a query builder we can just use "return $this->followings->contains($user);"
And of course, it's better to use a Redis for those methods but I think it's not for beginners :)
thanks again for your job
you are really good in teaching. Keep it up sir
Thank you for watching.
Outstanding..! man. Take love and live long by the grace of Almighty...!
Thanks for watching.
Great Content
Thank you
Is there a way to actually get rid of the red line errors which arent an actual errors ? since laravel does not detect the "followings()" method
you are a legend!
Thank you
Thanks.
Don't you think that the Follow/Unfollow button could be better if done with Livewire ?
I agree, makes more sense to use livewire on a real world application. I'm assuming viewers of this series are not familiar with livewire. But you gave me a great idea, I might redo these at the end of the course using livewire.
Thank you for watching
@@yelocode Damn, if you make this application in Livewire I would love it.
Bro, you helped me so much. I have question, is there easy way to implement microsoft oauth sign in in laravel?
I personally have never implemented microsoft oauth, For google and facebook Laravel Socialite is super easy and I used it multiple times but does not support microsoft.
Microsoft seems to have a tutorial on this learn.microsoft.com/en-us/graph/tutorials/php?tutorial-step=4&tabs=aad if you haven't checked it out already.
Thanks Boss
Thanks for the support
thanks for your hellp man
thanks man
Thank you for watching bro
Hello Bro
I got error in this section
Error
PHP 8.3.1
Call to a member function attach() on false
public function follow(User $user)
{
$follower = auth()->user();
$follower->followings()->attach($user);
return redirect()->route('users.show',$user->id)-with('success',"followed succesfully!");
}
Can you help with that please?
Looks like an issue with your relationship definition,
make sure you have the relationship defined on your User model.
public function followings()
{
return $this->belongsToMany(User::class, 'follower_user', 'follower_id', 'user_id')->withTimestamps();
}
@yelocode thank you i fixed it now
hello there's a small issue to be resolved in your user model
your function defination rises a expection stating call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::exits()
if your are using the below code which i have commented out below so to solve it you can use other intruction it works fine
public function follows( User $user){
// return $this->following()->where('user_id', $user->id)->exists();
return $this->following()->where('follower_id', $this->id)->where('user_id', $user->id)->exists();
}
thank you