laravel-nami-api/src/NamiServiceProvider.php

24 lines
522 B
PHP

<?php
namespace Zoomyboy\LaravelNami;
use Illuminate\Support\Facades\Auth;
use GuzzleHttp\Client as GuzzleClient;
use Illuminate\Support\ServiceProvider;
class NamiServiceProvider extends ServiceProvider
{
public function boot()
{
Auth::provider('nami', function ($app, array $config) {
return new NamiUserProvider($config['model']);
});
}
public function register() {
$this->app->singleton('nami.api', function() {
return new Api();
});
}
}