init
This commit is contained in:
31
app/Api/Controllers/MessageController.php
Normal file
31
app/Api/Controllers/MessageController.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Api\Controllers;
|
||||
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
|
||||
class MessageController extends Controller
|
||||
{
|
||||
public function send()
|
||||
{
|
||||
$imParams = [
|
||||
'SyncOtherMachine' => 2,
|
||||
'From_Account' => '8',
|
||||
'To_Account' => '1',
|
||||
'MsgLifeTime' => 360,
|
||||
'MsgSeq' => rand(1, 999999),
|
||||
'MsgRandom' => rand(1, 999999),
|
||||
'MsgBody' => [
|
||||
[
|
||||
'MsgType' => 'TIMTextElem',
|
||||
'MsgContent' => [
|
||||
'Text' => 'hi, beauty',
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
$vars = app('im')->send('openim', 'sendmsg', $imParams);
|
||||
dd($vars);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user