diff --git a/src/Fields/Translatable.php b/src/Fields/Translatable.php index 7fba24a..f80815b 100644 --- a/src/Fields/Translatable.php +++ b/src/Fields/Translatable.php @@ -130,6 +130,17 @@ public function json(): static return $this; } + public function customInputField(string $class): static + { + if (!is_subclass_of($class, Field::class)) { + throw new FieldException('The passed class must be a subclass of MoonShine\Fields\Field'); + } + + $this->inputField = $class; + + return $this; + } + public function keyValue( string $key = 'Language', string $value = 'Value',