2017 © Pedro Peláez
 

library auth

Multi-Auth for Laravel 5.1.

image

reed/auth

Multi-Auth for Laravel 5.1.

  • Friday, November 11, 2016
  • by tylernathanreed
  • Repository
  • 1 Watchers
  • 1 Stars
  • 199 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 22 Versions
  • 12 % Grown

The README.md

Multi-Auth for Laravel 5.1

Latest Stable Version Total Downloads, (*1)

This is a mostly drop-in replacement for Laravel 5.2's Multi-Auth for Laravel 5.1. Most of the source core for this project comes from Laravel 5.2, and is just refactored to work with 5.1., (*2)

Deprecation Notice: With the final end of Laravel 5.1 being behind us, I am marking this package as abandoned. By now, everyone should be using Laravel 5.5 or greater. While I may still provide periodic updates, I am no longer officially maintaining this package., (*3)

Installation

Composer

Require this package with composer:, (*4)

composer require reed/auth

Service Providers

After updating composer, add the Service Provider to the providers array in config/app.php., (*5)

Reed\Auth\AuthServiceProvider::class

To avoid conflicts, you should also remove Laravel's Auth Provider., (*6)

// Illuminate\Auth\AuthServiceProvider::class,

However, you should keep Laravel's Auth Facade, as this package just replaces the underlying singleton., (*7)

Configuration

Go ahead and grab yourself a copy of Laravel 5.2's configuration file. The old configuration file won't work, and you'll probably want to configure this one to match your settings., (*8)

Replacement

Any references to Laravel 5.1's Authorization Layer isn't going to work anymore. You'll want to swap them out with the new components. Here are the new class paths:, (*9)

  • Illuminate\Auth\* => Reed\Auth\*
  • Illuminate\Contracts\Auth\* => Reed\Auth\Contracts\*
  • Illuminate\Foundation\Auth\* => Reed\Auth\Foundation\*

Common places to find these are:, (*10)

  • Authenticate and RedirectIfAuthenticated Middlewares
  • The User Model

Usage

It's exactly the same as Multi-Auth in Laravel 5.2, so I'll refer you to the documentation., (*11)

The Versions