Add groups, and the option for objects to be linked to one (or more) groups. #3128

This commit is contained in:
James Cole
2020-06-05 06:25:39 +02:00
parent 07c7bf1d49
commit 61e24a41a2
4 changed files with 93 additions and 1 deletions

View File

@@ -126,6 +126,14 @@ class PiggyBank extends Model
throw new NotFoundHttpException;
}
/**
* Get all of the tags for the post.
*/
public function objectGroups()
{
return $this->morphToMany(ObjectGroup::class, 'object_groupable');
}
/**
* @codeCoverageIgnore
* @return MorphMany