From b4310ca04bfb91cee8c7c64100b64f7e00363f5f Mon Sep 17 00:00:00 2001 From: Matt Young Date: Mon, 5 Aug 2024 15:59:04 -0500 Subject: [PATCH] Create audit log table and model --- app/Models/AuditLogEntry.php | 11 +++++++ ..._205055_create_audit_log_entries_table.php | 30 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 app/Models/AuditLogEntry.php create mode 100644 database/migrations/2024_08_05_205055_create_audit_log_entries_table.php diff --git a/app/Models/AuditLogEntry.php b/app/Models/AuditLogEntry.php new file mode 100644 index 0000000..c4bd3ee --- /dev/null +++ b/app/Models/AuditLogEntry.php @@ -0,0 +1,11 @@ +id(); + $table->string('user'); + $table->string('message'); + $table->json('affected')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('audit_log_entries'); + } +};