资源简介

基于 laravel 和 EasyWechat 开发的微信消息模板通知功能

资源截图

代码片段和文件信息

/**
 * Created by PhpStorm.
 * User: HanSon
 * Date: 2017/2/15
 * Time: 13:24
 */

namespace Hanson\WechatNotice;


use EasyWeChat\Foundation\Application;

class Notice
{

    /**
     * @var Application
     */
    public $wechat;

    private $failClosure;

    /**
     * Notice constructor.
     */
    public function __construct()
    {
        $config = config(‘services.wechat‘);
        $this->wechat = is_array($config) ? new Application(config(‘services.wechat‘)) : null;
    }

    /**
     * set a exist wechat instance
     *
     * @param $wechat
     * @return $this
     */
    public function setWechat($wechat)
    {
        $this->wechat = $wechat;
        return $this;
    }

    public function setConfig($config)
    {
        $this->wechat = new Application($config);
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-02-16 08:24  wechat-notice-master\
     文件         270  2017-02-16 08:24  wechat-notice-master\.gitignore
     文件        1063  2017-02-16 08:24  wechat-notice-master\LICENSE
     文件        1448  2017-02-16 08:24  wechat-notice-master\README.md
     文件         537  2017-02-16 08:24  wechat-notice-master\composer.json
     目录           0  2017-02-16 08:24  wechat-notice-master\src\
     文件        2356  2017-02-16 08:24  wechat-notice-master\src\Notice.php
     文件         384  2017-02-16 08:24  wechat-notice-master\src\NoticeFacade.php
     文件         409  2017-02-16 08:24  wechat-notice-master\src\NoticeServiceProvider.php
     目录           0  2017-02-16 08:24  wechat-notice-master\tests\
     文件        2100  2017-02-16 08:24  wechat-notice-master\tests\NoticeTest.php

评论

共有 条评论