Jump to content

Duplicate entry when saving repeater


Migu
 Share

Recommended Posts

Hello, I have a problem when saving repeater. When I do the following I always have a duplicate entry.

            $notification = $user->notifications->getNew();
            $notification->messageid = $arr_data['messageid'];
            $notification->notificationid = $arr_data['notificationid'];
            $notification->users = $arr_data['userid'];
            $notification->date = time();
            $notification->save();
            $user->notifications->add($notification);
            $user->save();     

What am I doing wrong?

Thanks for feedback

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...