Download the PHP package codedive-io/laravel-code-verification without Composer
On this page you can find all versions of the php package codedive-io/laravel-code-verification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-code-verification
Laravel Code Verification
A package for issuing and verifying temporary confirmation codes for users in a Laravel application. It can be used for various purposes such as password reset, email or phone number verification, and two-factor authentication.
Key Features
- Code Issuance : Generate a unique confirmation code for a specific recipient (e.g., email, phone number)
- Code Verification : Validates whether the issued code is correct, not expired, and has not exceeded the maximum number of attempts.
- Event-Driven : Events are fired upon code issuance, verification, or revocation, allowing for easy integration with you business logic.
Installation
Install the package using Composer.
Database Migration
After installing the package, you need to run the migrations to create the verification_codes table. The migrations are automatically loaded by the service provider.
Usage
1. Code Issuance
Use the issue method of the CodeVerificationService to issue a confirmation code.
Using the Service
Using the Facades
2. Code Verification
Use the verify method to validate the code entered by the user.
Using the Services
Using the Facades
3. Event
You can listen for the following events when they are triggered:
- When issued :
CodeIssuedEvent - When Verified :
CodeVerifiedEvent - When Revoked :
CodeRevokedEvent
4. Configuration
If you need, you can publish configuration file.
You can change the configuration values through the config/code_verification.php file.
Uninstall Package
Rollback the specific migration
Uninstall the package using Composer.
Contribution
Bug reports, feature suggestions, and pull requests are welcome. You can contribute via the Github Repository.
LICENSE
This package is open-sourced software licensed under the MIT license.