'array', 'social_media' => 'array', 'date_of_birth' => 'date', ]; protected static function boot() { parent::boot(); static::creating(function ($member) { // Only generate if unique_id is not set if (empty($member->unique_id)) { $member->unique_id = Str::random(50); } }); } }