src/Audit.php
protected function getFormattedValue(Model $model, string $key, $value)
    {
        // Apply defined get mutator
        if ($model->hasGetMutator($key)) {
            return $model->mutateAttribute($key, $value);
        }

        // Cast to native PHP type
        if ($model->hasCast($key)) {
            return $model->castAttribute($key, $value);
        }

        // Honour DateTime attribute
        if ($value !== null && in_array($key, $model->getDates(), true)) {
            return $model->asDateTime($value);
        }

        return $value;
    }
protected function getFormattedValue(Model $model, string $key, $value)
    {
        // Apply defined get mutator
        if ($model->hasGetMutator($key)) {
            return $model->mutateAttribute($key, $value);
        }

        // Cast to native PHP type
        if ($model->hasCast($key)) {
            return $model->castAttribute($key, $value);
        }

        // Honour DateTime attribute
        if ($value !== null && in_array($key, $model->getDates(), true)) {
            return $model->asDateTime($value);
        }

        return $value;
    }
protected function getFormattedValue ( Model $ model , string $ key , $ value ) { // Apply defined get mutator if ( $ model -> hasGetMutator ( $ key ) ) { return $ model -> mutateAttribute ( $ key , $ value ) ; } // Cast to native PHP type if ( $ model -> hasCast ( $ key ) ) { return $ model -> castAttribute ( $ key , $ value ) ; } // Honour DateTime attribute if ( $ value !== null && in_array ( $ key , $ model -> getDates ( ) , true ) ) { return $ model -> asDateTime ( $ value ) ; } return $ value ; }
Get the formatted value of an Eloquent model.

@param Model  $model
@param string $key
@param mixed  $value

@return mixed
Get the formatted value of an Eloquent model .