You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
582 B
34 lines
582 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Contracts\Support\DeferrableProvider;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Yaml;
|
|
|
|
class YamlServiceProvider extends ServiceProvider implements DeferrableProvider
|
|
{
|
|
/**
|
|
* Register application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton(Yaml::class, static function($app) {
|
|
return new Yaml();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Get the services provided by this provider.
|
|
*
|
|
* @return string[]
|
|
*/
|
|
public function provides()
|
|
{
|
|
return [Yaml::class];
|
|
}
|
|
}
|
|
|