1
0
Fork 0

app/Http/Livewire/Form/CardForm.php: Adding getSubjectProperty()

This commit is contained in:
Henrik Hautakoski 2022-01-15 14:14:26 +01:00
parent f91216c983
commit de7c503cfe

View file

@ -57,4 +57,14 @@ class CardForm extends ModelForm
$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";
}
}