what is mutator in laravel code example
Example: laravel mutators
class Video extends Model
{
public function setDurationInMinutesAttribute($value)
{
$this->attributes['duration_in_seconds'] = $value * 60;
}
public function setDurationInHoursAttribute($value)
{
$this->attributes['duration_in_seconds'] = $value * 60 * 60;
}
}