Skip to content

problem with Notifable trait in user #200

Description

@mohamed-alashry

I have installed Notifynder 3.2 inside my laravel app, for try if it works I have just insert one notification :

 $user_sender_id   = 1;
 $user_receiver_id = 2;
 Notifynder::category('hello')
        ->from($user_sender_id  )
        ->to($user_receiver_id)
        ->url('http://www.yourwebsite.com/page')
        ->send();

It works properly, if I check inside database notification is there.

The problem happens when I try to get the notification in that way:

$user = User::find(2);
dd($user->getNotifications($limit = 10, $paginate = 1, $order = 'desc'));
The result is that: Notification result

The result is empty, but in database notification exist

Notification Table

and if i used
Notifynder::getAll(2,$limit = null,$paginateBool = null)
i can get them .

and i add this in my app/User.php:

use Fenos\Notifynder\Notifable;

class User extends Authenticatable
{

   use Notifable;

}

can anyone help me ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions