Download the PHP package puz/multicolumnauth without Composer

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

Laravel MultiColumnAuth

Ever felt like you need to allow both a username and email field? Then you're in luck!
Puz MultiColumnAuth enables you to allow your users to use whatever userfield they want to when they log in!

Installation

composer require puz/multicolumnauth

You will need to update your config/app.php by adding the service provider to your application.
Add this under the provider section: Puz\MultiColumnAuth\ServiceProvider::class

To configure your fields and columns you'll need to add my configuration files. Simply do this by running the artisan command php artisan vendor:publish

The last thing you have to do now, is to replace the current Authorization trait. In the default AuthController class, you will see that laravel have included use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;. If you're still using both the authentication and registration of users, simply change this to: use Puz\MultiColumnAuth\AuthenticatesAndRegistersUsers;. If you don't need registration, simply change it to use Puz\MultiColumnAuth\AuthenticatesUsers;, or do the same if you have a custom registration trait maybe and need to include this AuthenticatesUsers in your custom class. In short, there are two available trais:
Puz\MultiColumnAuth\AuthenticatesAndRegistersUsers
Puz\MultiColumnAuth\AuthenticatesUsers

How to

Select which columns I can use for login
In your newly created config file from php artisan vendor:publish located in config/puz/multicolumnauth.php, there exists a array with a key named columns. This key takes an array as a value with the columns you want the users to log in with. Ex: ['username', 'email'] will check for the username column and then email.

Select name of login field
In the same config file, you have a key loginfield. This is set to login as default. This means that the input field where you usually inputs a username or email, you use the name login, or to something you freely choose yourself.

How does it work?

If you have specified columns to log in with, if will loop through each one and try to log in. If it succeeds by one of then (first one to succeed), then it will log in with that.

There is a catch tho.. If you for an example have set the columns to allow username, phone and email, in that specific order, then you have to be alert what the username might be. Someone can have created a username as someone else email. If they by any chance have the same password, someone will have access to another account.

As a fallback if you want to use laravel's default, you can simply change the columns in the config to a null value, like this

[
    'columns' => null,
]

All versions of multicolumnauth with dependencies

PHP Build Version
Package Version
Requires illuminate/contracts Version ^5.2
illuminate/support Version ^5.2
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 puz/multicolumnauth contains the following files

Loading the files please wait ....