✨
Virtue
View on GitHub
  • ✨Virtue
  • 🚀GETTING STARTED
    • Installation
    • Changelog
  • 🛠️MODEL ATTRIBUTES
    • Configuration
    • Cast
    • Database
    • Dispatches Events
    • Fillable
    • Hidden
    • Primary Key
    • Relationships
  • 💻COMMAND ATTRIBUTES
    • Configuration
    • Defining Arguments
    • Defining Options
Powered by GitBook
On this page

Was this helpful?

  1. MODEL ATTRIBUTES

Hidden

The Hidden attribute allows you to set your Model's properties to be hidden in the same way that the $hidden property does.

use Illuminate\Database\Eloquent\Model;
use WendellAdriel\Virtue\Models\Attributes\Hidden;
use WendellAdriel\Virtue\Models\Concerns\Virtue;

#[Hidden([
    'secret_field',
    'sensitive_data',
])]
final class Product extends Model
{
    use Virtue;
}
PreviousFillableNextPrimary Key

Last updated 1 year ago

Was this helpful?

🛠️