Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
636 stars 200 forks source link

Empty response when trying to get user-content #273

Closed Awlexus closed 6 years ago

Awlexus commented 6 years ago

I have a User class like the following:

class User extends BaseModel
{
    protected $label = 'User'; // or array('User', 'Fan')

    protected $fillable = ['name', 'email'];

    public function topics() {
        return $this->hasMany('App/Topic', 'CREATED');
    }

}

Then I create them like this:

$topic = new Topic([
     'title' => $payLoad['title']
]);

$user->topics()->save($topic);

Which works as Intended, but when I try to retrieve the Topics for the current user like $topics = user()->topics I get an empty array. Did I do Something wrong?

Awlexus commented 6 years ago

Label me as a retard and forget it