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.
 
 
 
 
 
 
zhishifufei_php/extend/service/MessageService.php

18 lines
434 B

<?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;
}
}