You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
434 B
19 lines
434 B
8 months ago
|
<?php
|
||
|
namespace service;
|
||
|
use app\wap\model\user\Message;
|
||
|
use app\wap\model\user\MessageType;
|
||
|
class MessageService
|
||
|
{
|
||
|
|
||
|
public static function sendmsg($user_id, $message_type = 1, $content = ""){
|
||
|
$msg = [
|
||
|
'user_id' => $user_id,
|
||
|
'message_type' => $message_type,
|
||
|
'content' => $content,
|
||
|
'add_time' => time(),
|
||
|
];
|
||
|
Message::create($msg);
|
||
|
return true;
|
||
|
}
|
||
|
}
|