laravel-nova-nested-form icon indicating copy to clipboard operation
laravel-nova-nested-form copied to clipboard

Make Singular Label and Plural Label Translatable

Open amidesfahani opened this issue 4 years ago • 1 comments

Make Singular Label and Plural Label Translatable

$this->singularLabel = Str::singular($this->name);
$this->pluralLabel = Str::plural($this->name);

suggest:

$this->singularLabel = $resource::singularLabel();
or
$this->singularLabel = __(Str::singular($this->name));

amidesfahani avatar Oct 09 '20 09:10 amidesfahani

you can take new object from NestedForm then override variable value EX: $nestedForm = new NestedForm($name, $attribute, $resource) $nestedForm->pluralLabel = "name you want"

IbrahemElanany avatar Apr 14 '21 11:04 IbrahemElanany