Maidul I
Maidul I

Reputation: 332

Getting error when trying to add a feed to a user in GetStream

I'm new to GetStream API and have been trying to get it to install with Laravel. I have followed all the documentation on how to install it. However, now that I'm trying to do a simple add to a modal, I get this error. The error im getting 1. Here is how my model looks 2. Would love some guidance. Thank you!

Upvotes: 1

Views: 68

Answers (1)

Oluwafemi Sule
Oluwafemi Sule

Reputation: 38982

The ActivityTrait needs to be imported before using it in Want model; otherwise it's resolved in the current namespace.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use GetStream\StreamLaravel\Eloquent\ActivityTrait;

class Want extends Model {
  use ActivityTrait;
  #...
}

Upvotes: 2

Related Questions