Skip to content

Commit e2abcba

Browse files
author
David Shen
committed
Merge branch 'master' of github.com:sicaboy/laravel-security
2 parents 305b030 + d11bef5 commit e2abcba

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ event(new \Illuminate\Auth\Events\PasswordReset($user));
119119
]
120120
```
121121

122-
2. To enable the policy "force user change password every x days", you will need to use this middleware
122+
2. To reject locked accounts and force user to change their password every x days, you will need to use this middleware
123123

124124
```php
125125
Route::middleware(['security'])->group(function () {

database/migrations/2020_01_01_173148_create_laravel_security_tables.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ class CreateLaravelSecurityTables extends Migration
99
/**
1010
* {@inheritdoc}
1111
*/
12-
/*public function getConnection()
12+
public function getConnection()
1313
{
1414
return config('database.default');
15-
}*/
15+
}
1616

1717
/**
1818
* Run the migrations.
@@ -24,15 +24,15 @@ public function up()
2424
if (!config('laravel-security')) {
2525
throw new \Exception('Cannot read config [laravel-security]. Have you done vendor:publish?');
2626
}
27-
Schema::create(config('laravel-security.database.password_history_table'), function (Blueprint $table) {
27+
Schema::create(config('laravel-security.database.password_history_table', 'password_history'), function (Blueprint $table) {
2828
$table->increments('id');
29-
$table->bigInteger('user_id');
29+
$table->bigInteger('user_id')->index();
3030
$table->string('password', 60);
3131
$table->timestamps();
3232
});
33-
Schema::create(config('laravel-security.database.user_security_table'), function (Blueprint $table) {
33+
Schema::create(config('laravel-security.database.user_security_table', 'user_extend_security'), function (Blueprint $table) {
3434
$table->increments('id');
35-
$table->bigInteger('user_id');
35+
$table->bigInteger('user_id')->index();
3636
$table->date('last_loggein_at')->nullable();
3737
$table->date('last_password_updated_at')->nullable();
3838
$table->integer('status')->default(10);

0 commit comments

Comments
 (0)