laravel-learn-bbs/app/Providers/EasySmsServiceProvider.php
2018-06-03 16:11:51 +08:00

34 lines
608 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Overtrue\EasySms\EasySms;
class EasySmsServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->app->singleton(EasySms::class, function ($app) {
return new EasySms(config('easysms'));
});
$this->app->alias(EasySms::class, 'easysms');
}
}