public function getFieldHistory(string $field) : Collection
    {
        return $this->revisions->map(function ($revision) use ($field) : ?array {
            if ($revision->old($field) == $revision->new($field)) {
                return null;
            }

            return [
                'created_at' => (string) $revision->created_at,
                'user_id' => $revision->executor->id ?? null,
                'user_email' => $revision->executor->email ?? null,
                'old' => $revision->old($field),
                'new' => $revision->new($field),
            ];
        })->filter()->values();
    }
public function getFieldHistory(string $field) : Collection
    {
        return $this->revisions->map(function ($revision) use ($field) : ?array {
            if ($revision->old($field) == $revision->new($field)) {
                return null;
            }

            return [
                'created_at' => (string) $revision->created_at,
                'user_id' => $revision->executor->id ?? null,
                'user_email' => $revision->executor->email ?? null,
                'old' => $revision->old($field),
                'new' => $revision->new($field),
            ];
        })->filter()->values();
    }
public function getFieldHistory ( string $ field ) : Collection { return $ this -> revisions -> map ( function ( $ revision ) use ( $ field ) : ? array { if ( $ revision -> old ( $ field ) == $ revision -> new ( $ field ) ) { return null ; } return [ 'created_at' => ( string ) $ revision -> created_at , 'user_id' => $ revision -> executor -> id ?? null , 'user_email' => $ revision -> executor -> email ?? null , 'old' => $ revision -> old ( $ field ) , 'new' => $ revision -> new ( $ field ) , ] ; } ) -> filter ( ) -> values ( ) ; }
Get all updates for a given field.

@param  string $field
@return Illuminate\Support\Collection
Get all updates for a given field .