hasMany(Product::class); } /** * Get the parent category of the category. */ public function parent(): BelongsTo { return $this->belongsTo(Category::class, 'parent_id'); } /** * Get the children categories of the category. */ public function children(): HasMany { return $this->hasMany(Category::class, 'parent_id'); } protected $auditExclude = [ 'remember_token', ]; }