The Laravel Attribute Mask package automatically masks sensitive Eloquent model attributes like emails and phone numbers when retrieved from the database. Add the HasMaskedAttributes trait to your model, define maskable attributes, and the package handles masking on retrieval while preserving access to original values via getOriginal(). Configuration options control masking behavior including visible characters, mask character, and auto-detection patterns for phone fields.
Table of contents
# Main Features# Defining Maskable Attributes# Masking Behavior# Retrieving Original Values# Configuration Options# Getting Started1.1K Impressions