Skip to content

Commit

Permalink
Merge branch 'develop' into release/v0
Browse files Browse the repository at this point in the history
* develop:
  Laravel 7 compatibility
  • Loading branch information
biscolab committed Mar 15, 2020
2 parents f3ba5ff + 4d45ba0 commit d5a0ae1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Laravel Auth-log
User authentication log for Laravel 5 and 6.
User authentication log for Laravel 5, 6 and 7.
This package allows you to log user's authentication and force its logout if necessary!

**This package is still unstable. Please report any bug`and documentation lack in order to fix that promptly**.

Thanks for your help.

## System requirements

Set `session.driver` value
> To use this package the only allowed values of `session.driver` are `file`, `database`, `redis` (at the moment).
## Install`
## Install

You can install the package via composer:
```sh
Expand Down Expand Up @@ -44,6 +48,7 @@ Edit `config/authlog.php`
| `enabled` | `bool` | If `true` the package is active and user's authentication will be logged | `true` |
| `skip_ip` | `string` | A whitelist of IP addresses (CSV format) that, if recognized, disable the package | `''` |
| `table_name` | `string` | The name of the AuthLog database table | `authlog` |
| `users_table_size` | `string` | Users table size in order to add foreign keys (`int` means INT, `big` means BIGINT). Since Laravel 5.8, value should be `big` (*) | `big` |
| `authlog_model` | `string` | AuthLog class. You can change ìt **BUT** your custom class **MUST** implements `'Biscolab\LaravelAuthLog\Models\AuthLogInterface'` | `'Biscolab\LaravelAuthLog\Models\AuthLog'` |
| `session_model` | `string` | Session class. You can change ìt **BUT** your custom class **MUST** implements `'Biscolab\LaravelAuthLog\Models\SessionInterface'` | `'Biscolab\LaravelAuthLog\Models\Session'` |
| `session_auth_log_id_key` | `string` | Session key used to store your AuthLog ID | `'auth_log_id'` |
Expand All @@ -54,6 +59,8 @@ Edit `config/authlog.php`

> Remember to run the `php artisan config:cache` command
> (*) If you are using a custom `users` table please edit `datatbase/migratons/2019_09_19_000000_create_authlog_table.php` after run `vendor:publish` artisan command and before run `migration` artisan command
## Add `AuthLoggable` trait to `User` model

Use `Biscolab\LaravelAuthLog\Traits\AuthLoggable` in `App\User`
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "biscolab/laravel-authlog",
"description": "User's authentication log package for Laravel 5 and 6",
"version": "0.1.1",
"description": "User's authentication log package for Laravel",
"version": "0.2.0",
"license": "MIT",
"type": "library",
"keywords": [
Expand All @@ -19,11 +19,11 @@
],
"require": {
"php": "^7.1",
"laravel/framework": "^5.5|^6.0"
"laravel/framework": "^5.5|^6.0|^7.0"
},
"require-dev": {
"orchestra/testbench": "~3.0",
"phpunit/phpunit": "6.*|7.*"
"orchestra/testbench": "3.0|4.*|5.*",
"phpunit/phpunit": "6.*|7.*|8.*"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit d5a0ae1

Please sign in to comment.