create a class which handling friend requests with attributes 'fromUser','toUser','status'
when user open a friend profile then automatically sending a new request. On the other hand if the other user has also opened his profile then automatically has accepted the friend request.
for each case first we must check if exists a request which pending from this user.
Finally add friendship between users and change status to 'success' also display notification that and the other user has opened our profile.
create a class which handling friend requests with attributes 'fromUser','toUser','status'
when user open a friend profile then automatically sending a new request. On the other hand if the other user has also opened his profile then automatically has accepted the friend request.
for each case first we must check if exists a request which pending from this user.
Finally add friendship between users and change status to 'success' also display notification that and the other user has opened our profile.