Giter Site home page Giter Site logo

multi-auth's Introduction

Laravel Multi-Authentication Package

Total Downloads Latest Stable Version License Build Status

This package simplifies multi authentication for your Laravel project, it will scaffold all the files you need for creating a custom guard as well as setting it up ready for use.

Version Compatibility

Laravel Package Installation
5.3 2.x composer require bmatovu/multi-auth 2.*
5.4 3.x composer require bmatovu/multi-auth 3.*
5.5 4.x composer require bmatovu/multi-auth 4.*
5.6 5.x composer require bmatovu/multi-auth 5.*
5.7 6.x composer require bmatovu/multi-auth 6.*
5.8 7.x composer require bmatovu/multi-auth 7.*
6.0 8.x composer require bmatovu/multi-auth ^8.0
7.0 9.x composer require bmatovu/multi-auth ^9.0
8.0 master composer require bmatovu/multi-auth

The service provider will be auto-discovered for Laravel 5.5 and above. Alternatively; you may manually register the service provider in your configuration config/app.php file:

'providers' => array(
    // ...
    Bmatovu\MultiAuth\MultiAuthServiceProvider::class,
),

Bootstrapping

php artisan multi-auth:install {guard}

Default guard is named: admin be sure to use a guard name that suits your needs. This command will scaffold configurations, controllers, middleware, migrations, models, factories, notifications, routes, and views; to get you started.

See a full list of files created, or affected at files.md

Run Database Migrations

php artisan migrate

Getting started

Compile CSS and JS (Optional)

The Bootstrap and Vue scaffolding provided by Laravel as of version 6.0 is now located in the laravel/ui Composer package.

Laravel 8 has shifted the official Authentication support to Laravel/Fortify. This package is still scaffolding auth based off the laravel/ui but we intend to catch up ASAP.

Note: This should only be done for fresh installations.

composer require laravel/ui

php artisan ui bootstrap

npm install && npm run dev

Serve application

http://127.0.0.1:8000/{guard}

Extras

Check guards

$ php artisan tinker
...
>>> config('auth.guards');

Access guard instance:

Specify the guard instance you would like to use, eg using admin guard...

Auth::guard('admin')->user();

Check routes:

To find out which routes have been created for your guard.

php artisan route:list

Email verification:

You may require users to verify their email addresses before using the application. Read the wiki on how to enable this.

Reporting bugs

If you've stumbled across a bug, please help us by leaving as much information about the bug as possible, e.g.

  • Steps to reproduce
  • Expected result
  • Actual result

This will help us to fix the bug as quickly as possible, and if you wish to fix it yourself feel free to fork the package and submit a pull request!

multi-auth's People

Contributors

mtvbrianking avatar ankurk91 avatar mkarnicki avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.