Download the PHP package makidizajnerica/laravel-multiemail without Composer

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

Laravel MultiEmail

Allow users to have more than one email address related to their account. Let them set their primary and recovery email addresses.

Installation

As for registering Service Provider, it is not necessary, Laravel will auto load provider using Package Discovery.

Config

Inside config/auth.php add new provider like so:

After that you need to edit existing or create new guard:

Then go down under the passwords and edit it like so:

The last step would be to change Laravel's default Illuminate\Auth\Passwords\PasswordResetServiceProvider::class inside config/app.php like this:

This part is important if you want your users to be able to reset their passwords.

Publishing config

If your User model is not in default namespace you are going to need to publish multiemail.php config file using:

And then change the model class inside multiemail.php:

Migrations

First you are going to need to publish migrations using command:

Then run them:

After running the migrations new table emails will be created.

Please don't forget to remove email field from users table!

Usage

Go inside your App\Models\User::class and add MakiDizajnerica\MultiEmail\HasMultipleEmails::class trait and implement MakiDizajnerica\MultiEmail\Contracts\HasMultipleEmails::class:

Then be sure to define emails() relation method:

After that your User::class will have some methods available:

And some custom attributes:

Adding new email address

If user does not have primary email defined you can do something like this:

Email verification notification will be sent every time new email is added. If you dont want to send notification you can pass second argument to the addNewEmail() method like so:

Email types

User may only have one primary and one recovery email address, so it is recommended to use already defined methods for changing types of email addresses:

Email address cannot be primary and recovery at the same time!

Password resets

Defaut email address for password resets will be user's primary email. But if there is recovery email defined, user will be able to use that email address also. Laravel's default password reset service will still be usable as normal, to learn more about password resets visit https://laravel.com/docs/8.x/passwords.

Inside multiemail.php config file you will be able to enable/disable password resets and to specify if primary email should be used for those resets.

Author

Nemanja Marijanovic ([email protected])

Licence

Copyright © 2021, Nemanja Marijanovic [email protected]

All rights reserved.

For the full copyright and license information, please view the LICENSE file that was distributed within the source root of this package.


All versions of laravel-multiemail with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
laravel/framework 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 makidizajnerica/laravel-multiemail contains the following files

Loading the files please wait ....