2017 © Pedro Peláez
 

library serverchan

image

moorper/serverchan

  • Wednesday, May 23, 2018
  • by liuzhaowei
  • Repository
  • 0 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 50 % Grown

The README.md

ServerChan

一个关于【Server酱】的包, (*1)

关于【Server酱】http://sc.ftqq.com/3.version, (*2)

安装

composer require moorper/serverchan, (*3)

使用

use Moorper\ServerChan;

$client = new Client('sckey');
$client->send('text','desp');

在 laravel 中使用

  1. 新建 provider 文件 php artisan make:provider ServerChanProvider
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Moorper\ServerChan\Client;

class ServerChanProvider extends ServiceProvider
{
    /**
     * Bootstrap services.
     */
    public function boot()
    {
    }

    /**
     * Register services.
     */
    public function register()
    {
        $this->app->singleton('ServerChan', function () {
            return new Client('SCU24500T3ef124dd328fe4fc372925e708aa21a35acb04e70a274');
        });
    }
}
  1. 新建 facade 文件
<?php

namespace App\Facades;

use Illuminate\Support\Facades\Facade;

class ServerChan extends Facade
{
    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor()
    {
        return 'ServerChan';
    }
}

  1. 修改 config/app.php 文件

'providers' => [App\Providers\ServerChanProvider::class]
'aliases' => ['ServerChan' => App\Facades\ServerChan::class], (*4)

The Versions

23/05 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liuzhaowei

07/05 2018

v1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liuzhaowei

07/05 2018

v1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liuzhaowei

07/05 2018

v1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar liuzhaowei