PHPackages                             srlabs/centaur - 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. srlabs/centaur

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

srlabs/centaur
==============

An opinionated implementation of Cartalyst's Sentinel for Laravel 5

16.0.0(4w ago)6058.3k↓70.2%23MITPHPPHP ^8.3CI failing

Since Jan 19Pushed 4w ago3 watchersCompare

[ Source](https://github.com/stagerightlabs/Centaur)[ Packagist](https://packagist.org/packages/srlabs/centaur)[ RSS](/packages/srlabs-centaur/feed)WikiDiscussions dev Synced 2d ago

READMEChangelogDependencies (10)Versions (33)Used By (0)

Centaur
=======

[](#centaur)

[![Tests](https://github.com/stagerightlabs/Centaur/workflows/CI/badge.svg)](https://github.com/stagerightlabs/Centaur/workflows/CI/badge.svg)[![Packagist](https://camo.githubusercontent.com/baa65746da6695d496800a6602b6b943c67d5389820ef73348b5c6e91eff6369/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f53524c6162732f43656e746175722e737667)](https://packagist.org/packages/srlabs/centaur)[![Packagist](https://camo.githubusercontent.com/9e603af2cf6fa4d2f46bafed22a55862f19c8effc7dff158054e4129fb4885b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f53524c6162732f43656e746175722e737667)](https://packagist.org/packages/srlabs/centaur)[![Packagist](https://camo.githubusercontent.com/a244f14e87884031f3b4f8c2a07eb8fa8af1baace76e1f33301e7bb109e11da8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f53524c6162732f43656e746175722e737667)](https://packagist.org/packages/srlabs/centaur)

This package provides an opinionated implementation of [Cartalyst Sentinel](https://cartalyst.com/manual/sentinel/2.0) for [Laravel](https://github.com/laravel/laravel).

If you are using an older version of Laravel, there are [other versions](https://packagist.org/packages/srlabs/centaur) available.

Installation
------------

[](#installation)

**Install the Package Via Composer:**

```
$ composer require srlabs/centaur
```

**Add the Service Provider to your `config/app.php` file:**

```
'providers' => array(
    ...
    Centaur\CentaurServiceProvider::class,
    ...
)
```

This package will not make use of [automatic package discovery](https://laravel.com/docs/5.5/packages#package-discovery) - you will need to register it manually. This is intentional.

Usage in New Applications
-------------------------

[](#usage-in-new-applications)

If you are starting a new Laravel 5.\* application, this package provides a convenient way to get up and running with `Cartalyst\Sentinel` very quickly. Start by removing the default auth scaffolding that ships with a new Laravel 5.1 application:

```
$ php artisan centaur:spruce
```

Next, use Centaur's scaffolding command to create basic Auth Controllers and Views in your application:

```
$ php artisan centaur:scaffold
```

Publish the `Cartalyst\Sentinel` assets:

```
$ php artisan vendor:publish --provider="Cartalyst\Sentinel\Laravel\SentinelServiceProvider"
```

Run your database migrations:

```
$ php artisan migrate
```

Run the Database Seeder. You may need to re-generate the autoloader before this will work:

```
$ composer dump-autoload
$ php artisan db:seed --class="SentinelDatabaseSeeder"
```

You will also need to add these routes to your `routes.php` file:

```
// Authorization
Route::get('login', 'Auth\SessionController@getLogin')->name('auth.login.form');
Route::post('login', 'Auth\SessionController@postLogin')->name('auth.login.attempt');
Route::any('logout', 'Auth\SessionController@getLogout')->name('auth.logout');

// Registration
Route::get('register', 'Auth\RegistrationController@getRegister')->name('auth.register.form');
Route::post('register', 'Auth\RegistrationController@postRegister')->name('auth.register.attempt');

// Activation
Route::get('activate/{code}', 'Auth\RegistrationController@getActivate')->name('auth.activation.attempt');
Route::get('resend', 'Auth\RegistrationController@getResend')->name('auth.activation.request');
Route::post('resend', 'Auth\RegistrationController@postResend')->name('auth.activation.resend');

// Password Reset
Route::get('password/reset/{code}', 'Auth\PasswordController@getReset')->name('auth.password.reset.form');
Route::post('password/reset/{code}', 'Auth\PasswordController@postReset')->name('auth.password.reset.attempt');
Route::get('password/reset', 'Auth\PasswordController@getRequest')->name('auth.password.request.form');
Route::post('password/reset', 'Auth\PasswordController@postRequest')->name('auth.password.request.attempt');

// Users
Route::resource('users', 'UserController');

// Roles
Route::resource('roles', 'RoleController');

// Dashboard
Route::get('dashboard', function () {
    return view('Centaur::dashboard');
})->name('dashboard');
```

This is only meant to be a starting point; you can change them as you see fit. Make sure you read through your new Auth Controllers and understand how they work before you make any changes.

Centaur automatically installs Sentinel and registers the `Sentinel`, `Activations`, and `Reminders` aliases for you. Detailed instructions for using Sentinel [can be found here](https://cartalyst.com/manual/sentinel/2.0).

If you do decide to make use of Laravel's `Route::resource()` option, you will need to use [Form Method Spoofing](https://github.com/SRLabs/Centaur/wiki/Form-Method-Spoofing) to access some of those generated routes.

Usage in Existing Applications
------------------------------

[](#usage-in-existing-applications)

If you already have already built out your auth views and controllers, the best way to make use of this package is to inject the `AuthManager` into your controllers and use it as a wrapper for Sentinel. Detailed information about the `AuthManager` methods [can be found here](https://github.com/SRLabs/Centaur/wiki/AuthManager-Methods-and-Responses).

Using Customized Middleware
---------------------------

[](#using-customized-middleware)

It is possible that the behavior of the Middleware that comes with this package might not suit your exact needs. To adjust the middleware, create a copy of the problematic Centaur Middleware class in your `app/Http/Middleware` directory - this new class can be given any name you would like. You can then adjust the middleware references in your controllers and/or routes file to use the new class, or you can bind the new class to the Centaur Middleware class name in your App service provider, as such:

```
// app/providers/AppServiceProvider.php
/**
 * Register any application services.
 *
 * @return void
 */
public function register()
{
    $this->app->bind('Centaur\Middleware\SentinelGuest', function ($app) {
        return new \App\Http\Middleware\AlternativeGuestMiddleware;
    });
}
```

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance94

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 84.9% 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 ~130 days

Recently: every ~299 days

Total

30

Last Release

29d ago

Major Versions

11.01.00 → 12.0.02023-02-24

12.0.0 → 13.0.02024-07-08

13.0.0 → 14.0.02025-02-22

14.0.0 → 15.0.02025-06-01

15.0.0 → 16.0.02026-06-05

PHP version history (10 changes)1.0.0PHP &gt;=5.5.9

4.0.0PHP &gt;=5.6.4

5.0.0PHP &gt;=7.0.0

6.0.0PHP ^7.1.3

9.0.0PHP ^7.2

11.0.0PHP ^7.3

11.01.00PHP ^7.3 || ^8.0

12.0.0PHP ^8.1

13.0.0PHP ^8.2

16.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/97d8f58fda6a474519e876ece356e8246390e4e7f3b2c56ee8ec6bc1e88cfa6b?d=identicon)[Stage Right Labs](/maintainers/Stage%20Right%20Labs)

---

Top Contributors

[![rydurham](https://avatars.githubusercontent.com/u/674347?v=4)](https://github.com/rydurham "rydurham (107 commits)")[![prenna](https://avatars.githubusercontent.com/u/9112813?v=4)](https://github.com/prenna "prenna (7 commits)")[![fabiofdsantos](https://avatars.githubusercontent.com/u/8303937?v=4)](https://github.com/fabiofdsantos "fabiofdsantos (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![rorichster](https://avatars.githubusercontent.com/u/291208?v=4)](https://github.com/rorichster "rorichster (2 commits)")[![Mark-Howe](https://avatars.githubusercontent.com/u/1932792?v=4)](https://github.com/Mark-Howe "Mark-Howe (1 commits)")[![cgrice](https://avatars.githubusercontent.com/u/17614?v=4)](https://github.com/cgrice "cgrice (1 commits)")[![jigneshsolanki](https://avatars.githubusercontent.com/u/8208339?v=4)](https://github.com/jigneshsolanki "jigneshsolanki (1 commits)")[![brunowerneck](https://avatars.githubusercontent.com/u/60277385?v=4)](https://github.com/brunowerneck "brunowerneck (1 commits)")[![pierlon](https://avatars.githubusercontent.com/u/16200219?v=4)](https://github.com/pierlon "pierlon (1 commits)")

---

Tags

laravelauthsentinel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/srlabs-centaur/health.svg)

```
[![Health](https://phpackages.com/badges/srlabs-centaur/health.svg)](https://phpackages.com/packages/srlabs-centaur)
```

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

84611.1M63](/packages/php-open-source-saver-jwt-auth)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[jurager/teams

Laravel package to manage team functionality and operate with user permissions.

23822.5k](/packages/jurager-teams)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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