PHP code example of jose13 / larave-linebot-lottery

1. Go to this page and download the library: Download jose13/larave-linebot-lottery 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/ */

    

jose13 / larave-linebot-lottery example snippets


 'MessageTypeSupportChat' =>
        [
            'UserChats' =>
                [
                    MessageType::TEXT => true,
                    MessageType::TEMPLATE => false,
                    MessageType::IMAGEMAP => false,
                    MessageType::STICKER => false,
                    MessageType::LOCATION => false,
                    MessageType::IMAGE => false,
                    MessageType::AUDIO => false,
                    MessageType::VIDEO => false,
                    MessageType::FLEX => false,
                ],
            'GroupChats' =>
                [
                    ....
                ],
            'RoomChats' =>
                [
                    ....
                ]
        ]

    'TextResponse' =>
        [
            'QuickReplyButtonName' => '開啟服務',
            'Available' =>
                [
                    'UserChats' => true,
                    'GroupChats' => true,
                    'RoomChats' => true,
                ],
            'ResponseContent' =>
                [
                    'UserChats' =>
                        [
                            'hello' => 'hi',
                            '吃飽沒' => '吃了一公斤的鐵了!'
                        ],
                    'GroupChats' =>
                        [
                            'hello' => '你好阿',
                            '吃飽沒' => '我吃了10%的用電量了'
                        ],
                    'RoomChats' =>
                        [
                            'hello' => 'YO',
                            '吃飽沒' => '我是機器人不會餓!'
                        ],
                ]
        ],

    'QuickReply' =>
        [
            'UserChats' =>
                [
                    '最新威力彩' => true,//true or false
                    '最新大樂透' => true,
                    '最新539' => true,
                    '最新三種遊戲' => true,
                    '近3期三種遊戲' => true,
                    '近5期威力彩' => true,
                    '近5期大樂透' => true,
                    '近5期539' => true,
                    '近10期三種遊戲(純球號)' => true,
                    '指定威力彩日期' => true,
                    '指定大樂透日期' => true,
                    '指定539日期' => true,
                ],
            'GroupChats' =>
                [
                     ......
                ],
            'RoomChats' =>
                [
                     ......
                ]
        ]
bash
php artisan vendor:publish --provider=Jose13\\LaravelLineBotLottery\\LinebotServiceProvider