Download the PHP package aliziodev/laravel-gmail-unique without Composer

On this page you can find all versions of the php package aliziodev/laravel-gmail-unique. 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-gmail-unique

Laravel Gmail Unique

Packagist License Latest Stable Version Total Downloads PHP Version Laravel Version Laravel Version Laravel Version

Laravel Gmail Unique is a package that normalizes Gmail addresses during validation to prevent duplicate user registrations with Gmail's dot variations and plus aliases. Gmail treats addresses like [email protected], [email protected], and [email protected] as the same account, but standard validation treats them as different emails.

According to Google's official documentation Google: Getting messages sent to a dotted version of my address , if you add dots to a Gmail address, you'll still get that email. For example, if your email is [email protected], you own all dotted versions of your address:

This package ensures that your application recognizes these variations as the same email address, preventing duplicate accounts and improving user experience. This is especially recommended for SaaS systems with trial subscriptions to prevent users from creating multiple trial accounts using Gmail variations.

Features

Installation

You can install the package via composer:

After installation, you can use the package's install command:

Configuration

After publishing the configuration, you can modify the settings in config/gmail-unique.php :

Usage

Using the Trait

The simplest way to use this package is by adding the HasNormalizedEmail trait to your User model:

With this trait, your model will automatically:

  1. Normalize Gmail addresses during validation
  2. Prevent saving duplicate Gmail addresses with different dot variations or plus aliases
  3. Allow users to update their own email with different variations of the same normalized address

Using the Facade

This package also provides a Facade for easier access to the Gmail Unique functionality:

Using the Service

If you need more control, you can use the GmailUniqueService directly:

Custom Validation Rules

You can also use the service in custom validation rules:

Testing

The package includes comprehensive tests. You can run them with:

License

The MIT License (MIT). Please see License File for more information.

Contributing

Contributions are welcome! Please create issues or pull requests on the GitHub repository.


All versions of laravel-gmail-unique with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.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 aliziodev/laravel-gmail-unique contains the following files

Loading the files please wait ....