Is it possible to specify alternative / multiple labels for an attribute?
Is it possible to specify alternative / multiple labels for an attribute?
describe your use case
attributeLabels is a method. So you can implement any logic you like there. E.g. check the current scenario and return a different set of labels.
public function attributeLabels()
{
switch($this->scenario){
case 'register':
return array('name' => 'Your name');
case 'admin':
return array('name' => 'Username');
}
}