Download the PHP package ars/laravel-otp-code without Composer

On this page you can find all versions of the php package ars/laravel-otp-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-otp-code

OTP Code Laravel - One-Time Password In Laravel

Introduction

This Laravel package offers a comprehensive solution for generating, storing, and verifying One-Time Passwords (OTPs). It supports customizable OTP configurations, including type, length, expiration, encryption, and validation rules, ensuring secure and flexible OTP management in your Laravel applications.

Features

Requirements:

Installation

To install the package, follow these steps:

  1. Require the package via Composer:

  2. Publish the configuration file and migration:

  3. Run the migration:

Configuration

The configuration file otp-code.php includes the following options:

Usage

Repository

Creating an OTP

To create an OTP, use the create method:

Verifying an OTP

To verify an OTP, use the verify method:

Checking OTP Existence

To check if a valid OTP exists, use the has method:

Facade

The package provides a facade for easy access to the OTP repository:

Custom Validation Rule

The package includes a validation rule to validate OTP codes:

Example

Customization

Error Messages

You can customize the error messages by modifying the language files. Publish the language files using:

Commands

The package includes an Artisan command to purge expired OTP codes:

Conclusion

This package provides a robust solution for managing OTP codes in a Laravel application. By leveraging the repository, facade, and validation rules, you can easily integrate OTP functionality into your project.

Contributing

Contributions are welcome! Please adhere to the following guidelines:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/my-new-feature).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature/my-new-feature).
  5. Open a Pull Request.

License

This library is licensed under the MIT License.

Contact

For support or questions, please open an issue on GitHub.


All versions of laravel-otp-code with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ars/laravel-otp-code contains the following files

Loading the files please wait ....