| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function up() |
||
| 17 | { |
||
| 18 | Schema::table('users', function(Blueprint $table) |
||
| 19 | { |
||
| 20 | $table->timestamp('password_expires') |
||
| 21 | ->nullable() |
||
| 22 | ->after('active'); |
||
| 23 | }); |
||
| 24 | |||
| 25 | // Add the epiration timer to the settings database table |
||
| 26 | Settings::insert([ |
||
| 27 | 'key' => 'users.passExpires', |
||
| 28 | 'value' => '90' |
||
| 29 | ]); |
||
| 30 | |||
| 31 | // Update all of the existing users to set the password expiration date |
||
| 32 | User::where('password_expires', null)->update([ |
||
| 33 | 'password_expires' => date('Y-m-d', strtotime('+30 days')) |
||
| 34 | ]); |
||
| 52 |