laravel-learn-bbs/app/Providers/EasySmsServiceProvider.php

34 lines
608 B
PHP
Raw Normal View History

2018-06-03 08:11:51 +00:00
<?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');
}
}