PHP code example of jiuxiaoer / notice

1. Go to this page and download the library: Download jiuxiaoer/notice library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jiuxiaoer / notice example snippets


use Jiuxiaoer\Notice\lib\DingMsg;

$key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';
$sign = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';

$dingMsg = new DingMsg($key,$sign);

$dingMsg->text('普通消息测试', ['1769xxxxxxx'])

$dingMsg->link('链接测试', '欢迎Ceo!', 'https://www.79xj.cn/', 'https://www.79xj.cn/usr/uploads/2021/03/44950235.jpg')

$dingMsg->markdown('Markdown 测试', "#### Markdown 测试", ['1769xxxxxxx'])

$dingMsg->actionCard('我 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身',
            "![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png) \n\n #### 乔布斯 20 年前想打造的苹果咖啡厅 \n\n Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划"
            , '阅读全文', 'https://www.dingtalk.com/', '0')

$dingMsg->actionCardAlone('我 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身',
            "![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png) \n\n #### 乔布斯 20 年前想打造的苹果咖啡厅 \n\n Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划"
            , [['title' => '6666', 'actionURL' => 'https://www.79xj.cn'], ['title' => '6666', 'actionURL' => 'https://www.79xj.cn']])

	.
	.
	.
	 'notice' => [
		'dingKey' => env('DING_KEY'),
		'dingSign' => env('DING_SIGON'),
    ],

	.
	.
	.
	public function edit(DingMsg $weather) 
	{
		$response = $dingMsg->txt('测试');
	}
	.
	.
	.

	.
	.
	.
	public function edit() 
	{
		$response = app('dingMsg')->txt('测试');
	}
	.
	.
	.