2024-01-23 11:11:54 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
2024-01-25 17:29:29 +01:00
|
|
|
use GrahamCampbell\GitLab\Facades\GitLab;
|
2024-01-23 12:23:54 +01:00
|
|
|
use GrahamCampbell\GitLab\GitLabManager;
|
2024-01-23 11:11:54 +01:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register any application services.
|
2024-01-23 12:23:54 +01:00
|
|
|
*
|
|
|
|
|
* @return void
|
2024-01-23 11:11:54 +01:00
|
|
|
*/
|
2024-01-23 11:44:53 +01:00
|
|
|
public function register(): void
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap any application services.
|
2024-01-23 12:23:54 +01:00
|
|
|
*
|
|
|
|
|
* @return void
|
2024-01-23 11:44:53 +01:00
|
|
|
*/
|
|
|
|
|
public function boot(): void
|
2024-01-23 11:11:54 +01:00
|
|
|
{
|
2024-01-25 17:29:29 +01:00
|
|
|
app()->bind(GitLabManager::class, function () {
|
|
|
|
|
/** @var \Gitlab\Client */
|
|
|
|
|
$client = GitLab::connection(GitLab::getDefaultConnection());
|
|
|
|
|
return $client;
|
|
|
|
|
});
|
2024-01-23 11:11:54 +01:00
|
|
|
}
|
|
|
|
|
}
|