However, it's time consuming to create these all all your properties on your CRUD Model, so this is why I've created a small tool that generates the getters and setters.
Generate getters and setters
Add your attribute in snake case, comma-seperated in the above input field.
/**
* @param $attributeId
* @return $this
*/
public function setAttributeId($attributeId)
{
return $this->setData('attribute_id', $attributeId);
}
/**
* @param $colorKey
* @return $this
*/
public function setColorKey($colorKey)
{
return $this->setData('color_key', $colorKey);
}
/**
* @return mixed
*/
public function getAttributeId()
{
return $this->getData('attribute_id');
}
/**
* @return mixed
*/
public function getColorKey()
{
return $this->getData('color_key');
}
/**
* @param $attributeId
* @return $this
*/
public function setAttributeId($attributeId)
{
return $this->setData('attribute_id', $attributeId);
}
/**
* @param $colorKey
* @return $this
*/
public function setColorKey($colorKey)
{
return $this->setData('color_key', $colorKey);
}
/**
* @return mixed
*/
public function getAttributeId()
{
return $this->getData('attribute_id');
}
/**
* @return mixed
*/
public function getColorKey()
{
return $this->getData('color_key');
}