Download the PHP package gponster/laravel-auth-file without Composer
On this page you can find all versions of the php package gponster/laravel-auth-file. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-auth-file
Laravel File-Based DB Auth
- Laravel: 4.2
- Author: Gponster
This package is not a replacement for laravels default Auth library, it's a simple auth driver using configuration file-based DB for username/password.
Installation
Firstly you want to include this package in your composer.json file.
"require": {
"gponster/laravel-auth-file": "dev-master"
}
Now you'll want to update or install via composer.
composer update
Next you open up app/config/app.php and replace the AuthServiceProvider with
'Gonster\Auth\File\AuthServiceProvider',
NOTE It is very important that you replace the default service providers. If you do not wish to use Reminders, then remove the original Reminder server provider as it will cause errors.
Configuration is pretty easy too, take app/config/auth.php with its default values:
return array(
'driver' => 'eloquent',
'model' => 'User',
'table' => 'users',
'reminder' => array(
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
),
);
and replace the auth driver to 'file'
'driver' => 'file',
'model' => 'AuthUser',
'username' => 'email',
'password' => 'password',
The simple AuthUser class