doctrine/dbal for DB abstraction).PhoneVerification trait and PhoneCast for phone number handling align with Laravel’s Eloquent conventions.config/phone_auth.php allows customization without core modifications (e.g., SMS providers, templates).confirmed_phones table (managed by the package). Migration provided via vendor:publish.ConfirmedPhone model tested for data integrity?composer require livewire doctrine/dbal
php artisan vendor:publish --provider="Leeto\PhoneAuth\Providers\PhoneAuthServiceProvider"
User model with the trait and cast:
use PhoneVerification;
use Leeto\PhoneAuth\Casts\PhoneCast;
class User extends Authenticatable {
use PhoneVerification;
protected $casts = ['phone' => PhoneCast::class];
}
resources/views/auth/verify.blade.php):
@livewire('phone-verification', ['loginAndRegister' => true])
resources/views/vendor/phone-auth/).config/phone_auth.php with API keys (e.g., Twilio, AWS SNS)./verify-phone) are protected and accessible.throttle middleware).confirmed_phones table).dd() or Livewire::log() for debugging.doctrine/dbal queries.confirmed_phones table should index phone and user_id for large user bases.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| SMS provider API outage | Users unable to verify | Fallback to email or manual review queue. |
| Livewire session corruption | Verification state lost | Use Redis for session storage. |
| Race conditions in token validation | Duplicate logins/verifications | Atomic |
How can I help you explore Laravel packages today?