PHPackages                             lud/club - 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. lud/club

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

lud/club
========

Simple Laravel signup/login module, with simple user roles.

1.0.4(11y ago)369MITPHP

Since Apr 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/lud/club)[ Packagist](https://packagist.org/packages/lud/club)[ RSS](/packages/lud-club/feed)WikiDiscussions master Synced 6d ago

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

Club, Laravel authentication made simple
========================================

[](#club-laravel-authentication-made-simple)

Club is an authentication module made to work with Laravel 4 with minimal configuration and no other dependencies.

### Installation in 4 easy steps

[](#installation-in-4-easy-steps)

##### 1. Add club to your composer.json.

[](#1-add-club-to-your-composerjson)

```
{
	"require": {
		"laravel/framework": "4.2.*",
		...
		"lud/club": "~1.0"
	}
}
```

##### 2. Update dependencies

[](#2-update-dependencies)

Update your dependencies with composer from the shell.

```
composer update
```

##### 3. Add the service provider

[](#3-add-the-service-provider)

Just add `'Lud\Club\ClubServiceProvider',` to the end of the providers array in `app/config/app.php` :

```
	// ...

	'providers' => array(

		'Illuminate\Foundation\Providers\ArtisanServiceProvider',
		'Illuminate\Auth\AuthServiceProvider',
		// * snip *
		'Lud\Club\NovelServiceProvider',

	),

	// ...
```

##### 4. Create tables &amp; migrate

[](#4-create-tables--migrate)

Run the following commands in the shell :

###### 4.1 Create the users table

[](#41-create-the-users-table)

```
php artisan club:users-table
```

This will generate a migration in app/database/migrations called `..._create_club_users_table.php`. This migration creates the table to store your users. You can change the content of this file to suit your needs.

###### 4.2 Create the users table

[](#42-create-the-users-table)

```
php artisan auth:reminders-table
```

This will create a migration called `..._create_password_reminders_table.php`. Again, you can change the file if you need so. This migration creates a table to store password reminders tokens ("Lost Password" functionality).

###### 4.3 Create the users table

[](#43-create-the-users-table)

```
php artisan migrate
```

This will execute the migrations.

###### 4.4 (Optional) Model &amp; table configuration

[](#44-optional-model--table-configuration)

Note that the table name depends on the `auth.model` configuration value. The default value is `'User'`, so the migration will create a `users` table.

Check your `app/config/auth.php` file if you need to change that.

You can also change the table name by modifying your model :

```
class User extends Eloquent {

    protected $table = 'another_table';

}
```

### Test

[](#test)

Now, go to  (change the URL accordingly to your Laravel setup / web server), you can register to your site.

There are many chances like you see things like `validation.attributes.email`. This will change, now that Laravel handles package's lang files properly. But at the moment you will need to add these strings to your `app/lang/xx/validation.php` file (where `xx` is a lang code as `en` or `fr`).

### Club Configuration

[](#club-configuration)

Club works well with the default configuration, but you may want to tune a bit your installation. To do so, first publish the configuration to you app space, so you can properly update the Club package.

```
php artisan config:publish lud/club
```

You can now check the config file at `app/config/packages/lud/club/config.php`. Here is a simple explanation of each key/value but you may want to [post an issue](https://github.com/lud/club/issues/new) in the [Club's Github repository](https://github.com/lud/club).

##### 1. Controller

[](#1-controller)

This option let you specify which controller Club's routes are mapped to. You may wan copy the `ClubController` and add changes to your copy.

##### 2. Routes prefix

[](#2-routes-prefix)

This option allow you to change Club's URLs with a prefix, useful when you have other routes that conflict with Club. If you set `'prefix' => 'myprefix',`, the login page URL will be `/myprefix/login`.

All club routes have a route name. You can write a URL to any of these by using `URL::route('')` ; the prefix is automatically added.

The routes names and URLs (without prefix) are described here :

Route NameURL`club.signup``/signup``club.login``/login``club.lost_password``/lost-password``club.reset_password_access``/reset-password/{token}``club.logout``/logout`.###### Use routes on filters

[](#use-routes-on-filters)

If you set a route prefix, you need to change your auth filter in `app/filters.php`. Use the Club route name to the login page.

```
		// ...
		else
		{
			return Redirect::guest('login');
```

... will become ...

```
		// ...
		else
		{
			return Redirect::route('club.login');
```

##### 3. Default login/logout redirect

[](#3-default-loginlogout-redirect)

This are the URLs where a redirection is made to on login/logout if we cannot do a better redirection (see next).

##### 4. Login/out "No redirect" ("Stay on the page")

[](#4-loginout-no-redirect-stay-on-the-page)

This option allows the user to stay on the same page when clicking "login" or "logout" links. You don't want your site to send all of your users to the homepage when they log in or sign up.

- The `'all'` option adds this functionality to any named route.
- The `null` option disables this functionality entirely.
- An array of routes names enables this functionality for these routes only, e.g. `array('my_route','my_resource.show')`

##### 5. Views

[](#5-views)

You may want to change the Club views to add customization. Just execute this command :

```
php artisan view:publish lud/club
```

All the views will be present in `app/views/packages/lud/club`.

###### 5.1 Architecture

[](#51-architecture)

All Club forms are stored in their own blade template, in the `include` subdirectory of the Club views. For each form we have a wrapper, stored in the views directory, extending the default layout `base.blade.php` present in the `layouts` subdirectory.

Back to the configuration file, for each Club page, we have a value in the `views` array e.g. `'signup' => 'club::signup_form_wrapper'`. This means that to render the `signup` page, we call the `club::signup_form_wrapper` view.

We also have a `base_layout` configuration value, set to `club::layouts.base`. This makes `club::signup_form_wrapper` extend this view.

###### 5.2 The easy way

[](#52-the-easy-way)

So, the most easy thing to do is to change the `'base_layout'` config to set your own layout. You just need to define a `'club'` section in it :

```
@section('club')
@show
```

###### 5.3 The hard way

[](#53-the-hard-way)

If you need more control, just fill up the `'views'` array with your own view names in the configuration. The club controller will now call these views. In your blade files, you can still include the forms :

```
@include('club::include.signup_form')
```

##### 6. Emails

[](#6-emails)

To setup "lost password" functionality, you must use the `club.reset_password_access` route in your reminder email.

Check the `config.auth.reminder.email` configuration value in your `app/config/auth.php` file. This is the name of the view rendering the email that it sent to your users. You should replace `{{ URL::to('password/reset', array($token)) }}` with `{{ URL::route('club.reset_password_access', array($token)) }}` in this view.

You can also set the configuration to `'club::emails.reminder_email'`. This is the default Laravel view with the right route.

### User Validation

[](#user-validation)

You can add validation rules to your model class for automatic validation whenever a `User` (or whatever model you chose to use) is updated.

The default validation rules are the following :

```
class User extends Eloquent {
	// ...
	public $rules = array(
		'email'    => 'required|email|unique:'.$this->getTable().',email',
		'password' => 'required|min:3'
	);
	// ...
}
```

Feel free to set your own rules according to the [Laravel documentation](http://laravel.com/docs/master/validation).

### Roadmap

[](#roadmap)

- Enable "Stay on the page" when clicking signup
- Document UserRolesTrait
- Allow to login without email : provide way to choose arbitrary fields (e.g. `username`).
- `stay_on_page` default should be `null` ?
- Finish the docs
- Use L5 features (Request/AuthController/LoginRequest ?)
- Document L5 Installation

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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 ~38 days

Total

5

Last Release

4247d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e7e5f517984a12100a5791597c0992d606852dc148d0e73222cb60987987f89?d=identicon)[lud](/maintainers/lud)

---

Top Contributors

[![lud](https://avatars.githubusercontent.com/u/637632?v=4)](https://github.com/lud "lud (5 commits)")

---

Tags

laravelAuthenticationrolesloginsignup

### Embed Badge

![Health badge](/badges/lud-club/health.svg)

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

###  Alternatives

[silvanite/novatoolpermissions

Laravel Nova Permissions (Roles and Permission based Access Control (ACL))

100256.7k2](/packages/silvanite-novatoolpermissions)[hasinhayder/tyro

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

6712.1k2](/packages/hasinhayder-tyro)[zefy/laravel-sso

Simple PHP SSO integration for Laravel

1013.0k](/packages/zefy-laravel-sso)

PHPackages © 2026

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