Adam Pippin
3 years ago
2 changed files with 43 additions and 0 deletions
@ -0,0 +1,34 @@ |
|||||
|
<?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]; |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
<?php |
||||
|
|
||||
|
declare(strict_types=1); |
||||
|
|
||||
|
namespace App\Util; |
||||
|
|
||||
|
class Yaml |
||||
|
{ |
||||
|
} |
Loading…
Reference in new issue