public function create(Model $recipient, $notify = true)
    {
        $mention = $this->mention->create([
            'model_type' => get_class($this->model),
            'model_id' => $this->model->getKey(),
            'recipient_type' => get_class($recipient),
            'recipient_id' => $recipient->getKey()
        ]);

        $mention->setReference($this->model);

        if ($mention->pool($recipient)->auto_notify && $notify) {
            $mention->notify($notify);
        }

        return $mention;
    }
public function create(Model $recipient, $notify = true)
    {
        $mention = $this->mention->create([
            'model_type' => get_class($this->model),
            'model_id' => $this->model->getKey(),
            'recipient_type' => get_class($recipient),
            'recipient_id' => $recipient->getKey()
        ]);

        $mention->setReference($this->model);

        if ($mention->pool($recipient)->auto_notify && $notify) {
            $mention->notify($notify);
        }

        return $mention;
    }
public function create ( Model $ recipient , $ notify = true ) { $ mention = $ this -> mention -> create ( [ 'model_type' => get_class ( $ this -> model ) , 'model_id' => $ this -> model -> getKey ( ) , 'recipient_type' => get_class ( $ recipient ) , 'recipient_id' => $ recipient -> getKey ( ) ] ) ; $ mention -> setReference ( $ this -> model ) ; if ( $ mention -> pool ( $ recipient ) -> auto_notify && $ notify ) { $ mention -> notify ( $ notify ) ; } return $ mention ; }
Creates a mention record.

@return any
Creates a mention record .