protected function upsertDeletedAt(array $fields)
    {
        foreach ($fields as $field) {
            if ($field->isAutoManagedOnDelete()) {
                return $fields;
            }
        }

        $fields[] = $this->getNewDeletedAtField();

        return $fields;
    }
protected function upsertDeletedAt(array $fields)
    {
        foreach ($fields as $field) {
            if ($field->isAutoManagedOnDelete()) {
                return $fields;
            }
        }

        $fields[] = $this->getNewDeletedAtField();

        return $fields;
    }
protected function upsertDeletedAt ( array $ fields ) { foreach ( $ fields as $ field ) { if ( $ field -> isAutoManagedOnDelete ( ) ) { return $ fields ; } } $ fields [ ] = $ this -> getNewDeletedAtField ( ) ; return $ fields ; }
If a given fields collection does not contain a field called "deleted_at", one will be created.

@param array $fields

@return array
If a given fields collection does not contain a field called deleted_at one will be created .