Skip to content

Comments

v1.6.36#189

Open
roncodes wants to merge 10 commits intomainfrom
dev-v1.6.36
Open

v1.6.36#189
roncodes wants to merge 10 commits intomainfrom
dev-v1.6.36

Conversation

@roncodes
Copy link
Member

No description provided.

Manus AI and others added 10 commits February 11, 2026 03:40
This enhancement adds the user's updated_at timestamp to the cache key
generation in UserCacheService, enabling automatic cache busting when
user data is modified.

Changes:
- Updated getCacheKey() to accept User object and include updated_at timestamp
- Modified get(), put(), and invalidate() methods to work with User objects
- Updated UserController to pass User object to cache methods
- Added clarifying comments in UserObserver and User model

Benefits:
- Automatic cache invalidation when user data changes
- Improved cache consistency and data freshness
- Aligns with existing ETag implementation
- Simplifies cache management logic
…timestamp

feat: Include updated_at timestamp in UserCacheService cache key
The VerificationCode model was creating records with NULL status because
the generateFor() method never initialized the status field.

This caused issues when querying for verification codes with:
  ->where('status', 'pending')

Now all verification codes are created with status = 'pending' by default,
which is the expected behavior for newly generated codes.

Fixes verification flow for email and SMS verification codes.
…status

fix: Set default status to 'pending' for verification codes
Issue:
- Verification email was displaying raw HTML table code instead of rendered button
- Users saw: <table class="action" align="center"...> in the email body
- Caused by incorrect markdown mail template structure

Root Cause:
- Template used @component('mail::button') without @component('mail::message') wrapper
- Custom <x-mail-layout> component doesn't support nested markdown components
- Laravel markdown renderer couldn't process the button component properly

Solution:
- Replaced custom <x-mail-layout> with standard @component('mail::message')
- Properly wrapped @component('mail::button') inside message component
- Used markdown syntax for formatting (**, `code`, etc.)
- Removed custom layout that was incompatible with markdown components

Before:
<x-mail-layout>
    ...
    @component('mail::button', [...])
    @endcomponent
</x-mail-layout>

After:
@component('mail::message')
    ...
    @component('mail::button', [...])
    @endcomponent
@endcomponent

Result:
✅ Button renders correctly as HTML button
✅ No raw HTML code visible in email
✅ Proper markdown mail formatting
✅ Works with Laravel 10+ mail system
…ibility

Root Cause:
- VerificationMail used Laravel 10+ Content::markdown() syntax
- This processes markdown templates differently than old build()->markdown()
- The new Content API doesn't properly render @component('mail::button') inside custom layouts
- CompanyRegistered (working) uses old build()->markdown() syntax

Solution:
- Changed VerificationMail from content() method to build() method
- Now uses same syntax as CompanyRegistered and other working emails
- Keeps original x-mail-layout template with branding
- Button component now renders correctly

Changes:
1. VerificationMail.php: Replaced envelope()/content() with build()
2. verification.blade.php: Restored original template (no changes needed)

The issue wasn't the template - it was how the Mail class configured markdown processing!
…ndering

fix: Verification email showing raw HTML code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant