In this case, you can use the snake_case method to convert the column name to the appropriate camel case method name for the accessor. For example, if your column name is ActivityDateTime, you can create an accessor method like this:
public function getActivityDateTimeAttribute($value)
{
// Accessor logic here
}
The snake_case method will convert the method name to get_activity_date_time_attribute, which corresponds to the camel case representation of the ActivityDateTime column name.
Alternatively, you can specify the column name explicitly in the accessor method using the getAttribute method:
public function getActivityDateTimeAttribute($value)
{
return $this->getAttribute('ActivityDateTime');
}
This will return the value of the ActivityDateTime column for the current model instance.