yassilah / laravel-nova-nested-form

This package allows you to include your nested relationships' forms into a parent form.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Singular Label and Plural Label Translatable

amidesfahani opened this issue · comments

commented

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));

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