From 73083c611f1ddcc41ec712d5f4448df1270bc176 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 9 Apr 2025 21:34:16 +0100 Subject: Created migration, Model, Middleware, config --- src/Http/Models/AccessLog.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/Http/Models/AccessLog.php (limited to 'src/Http/Models/AccessLog.php') diff --git a/src/Http/Models/AccessLog.php b/src/Http/Models/AccessLog.php new file mode 100644 index 0000000..cdfef4b --- /dev/null +++ b/src/Http/Models/AccessLog.php @@ -0,0 +1,33 @@ +setTable(config('access_log.table_name')); + + parent::__construct($attributes); + } + + protected function cast(): array + { + return [ + 'properties' => 'collection', + ] + } + + public function user(): BelongsTo + { + return $this->belongsTo(config('access_log.user_model')); + } +} -- cgit v1.2.3