You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function follows()
{
return $this->morphedByMany('User', 'followable', 'follows', 'user_id', 'followable_id')->withTimestamps();
}
But when trying to use assertRelationship():
public function testMorphedByManyFollows()
{
$this->assertRelationship('follows', 'User', 'morphedByMany');
}
I get the error:
PHP Fatal error: Call to a member function withTimestamps() on a non-object in...
The text was updated successfully, but these errors were encountered:
chriszxv
changed the title
morphedByMany()->withTimestamp() makes assertRelationship() fail
morphedByMany()->withTimestamps() makes assertRelationship() fail
Jun 16, 2014
I'm trying to write a test for this:
But when trying to use assertRelationship():
I get the error:
The text was updated successfully, but these errors were encountered: