Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kunzilla's avatar

Friend request in laravel with relationships

Hi, whats the best way to build a user "send friend request" feature with laravel? I would like to know how i can use the laravel relationships.

Example: User A sends a request to User B. User B must confirm the request.

Hope you can give me an idea.

Thanks!

0 likes
3 replies
Kunzilla's avatar

Hi mvd, thanks, this looks good. I there any solution for messaging with "friends" whats workt with these package?

mvd's avatar

Sorry i did not create this package, try to contact the creator?

But i found this on Github so i think you will need to build your own implementation

This package is useful to any project that needs users to have friends. For example in a forum app you can let your users be friends with each other and then they can see their friends activities, or they can send messages with their friends or anything else you would like to implement in your app.

https://github.com/hootlex/laravel-friendships/issues/2#issuecomment-159362691

1 like

Please or to participate in this conversation.