35 lines
669 B
PHP
35 lines
669 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\WGRest;
|
|
use GuzzleHttp\Client;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton(WGRest::class, function ($app) {
|
|
$client = new Client(["base_uri"=>"http://home.kekskurse.de:8000/"]);
|
|
|
|
$wgrest = new WGRest($client, "secret");
|
|
return $wgrest;
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
|
|
}
|
|
}
|