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

15.0.0(11mo ago)6058.0k↓50%24[1 PRs](https://github.com/stagerightlabs/Centaur/pulls)MITPHPPHP ^8.2

Since Jan 19Pushed 11mo ago3 watchersCompare

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

READMEChangelogDependencies (5)Versions (31)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

55

—

FairBetter than 98% of packages

Maintenance50

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 84.2% 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 ~122 days

Recently: every ~405 days

Total

29

Last Release

351d ago

Major Versions

10.00.01 → 11.0.02020-09-15

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

PHP version history (9 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

### 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 (101 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

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)[jurager/teams

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

22817.3k](/packages/jurager-teams)[codebot/entrust

This package provides a flexible way to add Role-based Permissions to Laravel

1596.6k](/packages/codebot-entrust)[setiawanhu/sanctum-auth

Laravel package for generating user authentication feature using Laravel Sanctum

132.8k](/packages/setiawanhu-sanctum-auth)

PHPackages © 2026

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