PHPackages                             alextigaer/team-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. alextigaer/team-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

alextigaer/team-auth
====================

A simple multi-auth package for laravel 5.\*

1.0.1(7y ago)016MITPHP

Since Jun 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/alextigaer/team-auth)[ Packagist](https://packagist.org/packages/alextigaer/team-auth)[ Docs](https://github.com/alextigaer/team-auth)[ RSS](/packages/alextigaer-team-auth/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

**TeamAuth**
============

[](#teamauth)

A simple multi-auth package for Laravel 5.5/6

**Table of Contents**
=====================

[](#table-of-contents)

- [Installation](#installation)
- [Basic usage](#basic-usage)
- [Options](#options)
    - [--r](#registration)
    - [--controllers](#controllers)
    - [--views](#views)
    - [--model](#model)
    - [--config-auth](#config-auth)
    - [--migrations](#migrations)
    - [--m](#migrate)
    - [--seeder](#seeder)
    - [--s](#db-seed)
    - [--routes-web](#routes-web)
- [Config](#config)
- [Usage examples](#usage-examples)
- [Contributing](#contributing)
- [License](#license)

**Installation**
----------------

[](#installation)

```
composer require alextigaer/team-auth
```

**Basic usage**
---------------

[](#basic-usage)

To create a new role, just run the command:

```
php artisan team-auth:create RoleName
```

This command will:

- Create 5 controllers inside the App\\Http\\Controllers\\RoleName directory:
    - ForgotPasswordController
    - LoginController
    - RegisterController
    - ResetPasswordController
    - RoleNameController
- Create 5 (+ 1 if the layouts\\app.blade.php file is missing) views inside the resources\\views\\role\_name directory:
    - passwords\\email.blade.php
    - passwords\\reset.blade.php
    - dashboard.blade.php
    - login.blade.php
    - register.blade.php
- Create RoleName's model inside models' directory
- Edit config\\auth.php file to add the guard, the provider and the password resets for the role
- Create 2 migrations:
    - create\_role\_names\_table
    - create\_role\_names\_password\_resets\_table
- Create RoleNameSeeder and update DatabaseSeeder to call the generated seeder
- Edit routes\\web.php file to add the routes for the role

**Options**
-----------

[](#options)

If you want, you can use these options to customize the creation:

### --r (default=y)

[](#--r-defaulty-)

This option allows to choose if the users will be able to register to this role. Choosing the 'n' value, the RegisterController file and the register blade file won't be created and the register routes won't be added to the routes\\web file.

Possible values: y (default), n

Description:

```
{--r=y : Choose if users can register to this role, or not [y/n]}
```

Usage:

```
// Create the role excluding the possibility to register
php artisan team-auth:create RoleName --r=n
```

### --controllers (default=y)

[](#--controllers-defaulty-)

This option allows to choose if the controllers should be created.

Possible values: y (default), n

Description:

```
{--controllers=y : Choose whether to create controllers, or not [y/n]}
```

Usage:

```
// Create the role without creating the controllers
php artisan team-auth:create RoleName --controllers=n
```

### --views (default=y)

[](#--views-defaulty-)

This option allows to choose if the views should be created.

Possible values: y (default), n

Description:

```
{--views=y : Choose whether to create views, or not [y/n]}
```

Usage:

```
// Create the role without creating the views
php artisan team-auth:create RoleName --views=n
```

### --model (default=y)

[](#--model-defaulty-)

This option allows to choose if the model should be created.

Possible values: y (default), n

Description:

```
{--model=y : Choose whether to create model, or not [y/n]}
```

Usage:

```
// Create the role without creating the model
php artisan team-auth:create RoleName --model=n
```

### --config-auth (default=y)

[](#--config-auth-defaulty-)

This option allows to choose if the config\\auth file should be edited.

Possible values: y (default), n

Description:

```
{--config-auth=y : Choose whether to edit config\auth file, or not [y/n]}
```

Usage:

```
// Create the role without editing the config\auth file
php artisan team-auth:create RoleName --config-auth=n
```

### --migrations (default=y)

[](#--migrations-defaulty-)

This option allows to choose if the migrations should be created.

Possible values: y (default), n

Description:

```
{--migrations=y : Choose whether to create migrations, or not [y/n]}
```

Usage:

```
// Create the role without creating the migrations
php artisan team-auth:create RoleName --migrations=n
```

### --m (default=n)

[](#--m-defaultn-)

This option allows to choose if the migrate should be run.

Possible values: y, n (default)

Description:

```
{--m=y : Choose whether to run the command migrate, or not [y/n]}
```

Usage:

```
// Create the role running the migrate command
php artisan team-auth:create RoleName --m=y
```

### --seeder (default=y)

[](#--seeder-defaulty-)

This option allows to choose if the seeder should be created.

Possible values: y (default), n

Description:

```
{--seeder=y : Choose whether to create seeder, or not [y/n]}
```

Usage:

```
// Create the role without creating the seeder
php artisan team-auth:create RoleName --seeder=n
```

### --s (default=n)

[](#--s-defaultn-)

This option allows to choose if the db:seed should be run.

Possible values: y, n (default)

Description:

```
{--s=y : Choose whether to run the command db:seed, or not [y/n]}
```

Usage:

```
// Create the role running the db:seed command
php artisan team-auth:create RoleName --s=y
```

### --routes-web (default=y)

[](#--routes-web-defaulty-)

This option allows to choose if the routes\\web file should be edited.

Possible values: y (default), n

Description:

```
{--routes-web=y : Choose whether to edit routes\web file, or not [y/n]}
```

Usage:

```
// Create the role without editing the routes\web file
php artisan team-auth:create RoleName --routes-web=n
```

**Config**
----------

[](#config)

This package has its own configuration file. Inside that file, you'll find:

- An entry to specify where your models are
- The default values for the options. These values will be overwritten if you use the options by command line

**Usage examples**
------------------

[](#usage-examples)

1. Create a role called 'Admin' without creating the seeder, but running the migrations:

```
php artisan team-auth:create Admin --m=y --seeder=n
```

2. Create a role called 'Mod' preventing the users to register to this role:

```
php artisan team-auth:create Mod --r=n
```

3. Create a role called 'SuperUser' creating only the model:

```
php artisan team-auth:create SuperUser --controllers=n --views=n --config-auth=n --migrations=n --seeder=n --routes-web=n
```

**Contributing**
----------------

[](#contributing)

Feel free to suggest anything! Use pulls or contact me :)

**License**
-----------

[](#license)

TeamAuth is licensed under the MIT license. Made with love, let's share it! :)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

2

Last Release

2890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37dc59e295af9df1c303e5b5ebc7e89121fbd4327719481a8bd721da29a083ef?d=identicon)[alextigaer](/maintainers/alextigaer)

---

Top Contributors

[![alessiovietri](https://avatars.githubusercontent.com/u/8794395?v=4)](https://github.com/alessiovietri "alessiovietri (9 commits)")

---

Tags

laravelmultiauthmulti-authteam-authteamauth

### Embed Badge

![Health badge](/badges/alextigaer-team-auth/health.svg)

```
[![Health](https://phpackages.com/badges/alextigaer-team-auth/health.svg)](https://phpackages.com/packages/alextigaer-team-auth)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[smartins/passport-multiauth

Add support to multi-auth on Laravel Passport

285324.2k1](/packages/smartins-passport-multiauth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
