First Commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateAuthAttemptsTable
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (!Capsule::schema()->hasTable('auth_attempts')) {
|
||||
Capsule::schema()->create('auth_attempts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('ip')->index();
|
||||
$table->string('action')->index();
|
||||
$table->boolean('success')->default(false);
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Capsule::schema()->dropIfExists('auth_attempts');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user