File manager - Edit - /home/webapp69.cm.in.th/u69319090028/Shop/app/Models/ActivityLog.php
Back
<?php /** * ActivityLog Model * Maps to `activity_logs` table */ require_once __DIR__ . '/../Core/Model.php'; require_once __DIR__ . '/../Helpers/Security.php'; class ActivityLog extends Model { protected string $table = 'activity_logs'; public function record(?int $userId, string $action, ?string $entityType = null, ?int $entityId = null, ?string $description = null): void { $this->insert([ 'user_id' => $userId, 'action' => $action, 'entity_type' => $entityType, 'entity_id' => $entityId, 'description' => $description, 'ip_address' => Security::getClientIp(), 'created_at' => date('Y-m-d H:i:s') ]); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings