Skip to content

Commit

Permalink
Add Laravel ServiceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvermeyen committed Jan 1, 2020
1 parent 3296081 commit 88ededf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All Notable changes to **DotEnv Updater** will be documented in this file.

## 1.0.0 (2020-01-01)

- Add Laravel `ServiceProvider`.

## 1.0.0 (2019-12-31)

- Set and get `string`, `integer`, `boolean`, `null` and empty values.
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"CodeZero\\DotEnvUpdater\\Tests\\": "tests"
}
},
"extra": {
"laravel": {
"providers": [
"CodeZero\\DotEnvUpdater\\Laravel\\DotEnvUpdaterServiceProvider"
]
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
Expand Down
31 changes: 31 additions & 0 deletions src/Laravel/DotEnvUpdaterServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace CodeZero\DotEnvUpdater\Laravel;

use CodeZero\DotEnvUpdater\DotEnvUpdater;
use Illuminate\Support\ServiceProvider;

class DotEnvUpdaterServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}

/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->bind(DotEnvUpdater::class, function ($app) {
return new DotEnvUpdater($app->environmentFilePath());
});
}
}

0 comments on commit 88ededf

Please sign in to comment.