Search code examples
laravelgetstream-io

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!


Solution

  • 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;
      #...
    }