twitnic / laravel-fileauthprovider by twitnic

Read Username and Password from .env File.
58
0
2
Package Data
Maintainer Username: twitnic
Package Create Date: 2015-09-13
Package Last Update: 2016-05-19
Language: PHP
License: MIT
Last Refreshed: 2024-04-14 15:08:23
Package Statistics
Total Downloads: 58
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

laravel-fileauthprovider

Read Username and Password from .env-File

Installation

Require twitnic/laravel-fileauthprovider in composer.json and run composer update.

{
    "require": {
        "laravel/framework": "5.0.*",
        ...
        "twitnic/laravel-fileauthprovider": "*"
    }
    ...
}

Composer will download the package. After the package is downloaded, open config/app.php and add the service provider:

In Laravel 5.0:

'providers' => array(
    ...
    'Twitnic\FileAuth\FileAuthProvider',
),

In Laravel 5.1:

'providers' => array(
    ...
    'Twitnic\FileAuth\FileAuthProvider::class',
),

Usage

.env File:

Add the following Lines to your .env-File:

  • username=admin
  • password=admin

Configuration

Open config/auth.php and set appropiate driver and model:

[
    ...
    'driver' => 'File',
    ...
]

Use authentication as explained on Laravel's Authentication chapter.