app/Http/Livewire/Form/CardForm.php: Adding getSubjectProperty()
This commit is contained in:
parent
f91216c983
commit
de7c503cfe
1 changed files with 10 additions and 0 deletions
|
|
@ -57,4 +57,14 @@ class CardForm extends ModelForm
|
||||||
|
|
||||||
$this->validateOnly($property);
|
$this->validateOnly($property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSubjectProperty()
|
||||||
|
{
|
||||||
|
if ($this->record->character_id) {
|
||||||
|
return $this->characters[$this->record->character_id];
|
||||||
|
} else if ($this->record->class) {
|
||||||
|
return $this->classes[$this->record->class];
|
||||||
|
}
|
||||||
|
return "Somebody";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue