2020-06-27 23:45:49 +02:00
|
|
|
<?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() {
|
2021-04-09 23:22:35 +02:00
|
|
|
$this->app->singleton('nami.api', function() {
|
2020-06-27 23:45:49 +02:00
|
|
|
return new Api();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|