Fix models database calls and structural updates

This commit is contained in:
Hamza-Ayed
2026-05-21 18:42:33 +03:00
parent 92755472e1
commit 3c695e88fd
5 changed files with 43 additions and 43 deletions

View File

@@ -10,12 +10,12 @@ use App\Core\Security;
*/
class MessageLog extends BaseModel
{
protected string $table = 'messages_log';
protected static string $table = 'messages_log';
/**
* Securely log a new message
*/
public function logMessage(array $data)
public static function logMessage(array $data)
{
if (!empty($data['contact_phone'])) {
$data['contact_phone_hash'] = Security::blindIndex($data['contact_phone']);
@@ -30,6 +30,6 @@ class MessageLog extends BaseModel
$data['media_url'] = Security::encrypt($data['media_url']);
}
return $this->create($data);
return self::create($data);
}
}