$commentText, 'approved' => ($commentable->mustBeApproved() && !$this->isAdmin()) ? false : true, 'commented_id' => $this->id, 'commented_type' => get_class() ]); $commentable->comments()->save($comment); return $this; } /** * @return bool */ public function isAdmin() { return false; } /** * @return \Illuminate\Database\Eloquent\Relations\MorphMany */ public function comments() { return $this->morphMany(Comment::class, 'commented'); } }