#172 - facade used for config

This commit is contained in:
Kamil Niemczycki 2022-07-05 15:20:09 +02:00
parent 0f69b342ec
commit 552677bdb4
Signed by: kamilniemczycki
GPG Key ID: 04D4E2012F969213

View File

@ -6,6 +6,7 @@ namespace Toby\Infrastructure\Http\Middleware;
use Closure; use Closure;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Inertia\Middleware; use Inertia\Middleware;
use Toby\Domain\VacationRequestStatesRetriever; use Toby\Domain\VacationRequestStatesRetriever;
use Toby\Eloquent\Helpers\YearPeriodRetriever; use Toby\Eloquent\Helpers\YearPeriodRetriever;
@ -76,11 +77,11 @@ class HandleInertiaRequests extends Middleware
protected function getDeployInformation(): Closure protected function getDeployInformation(): Closure
{ {
return fn(): array => [ return fn(): array => [
"release_version" => config("heroku.release_version"), "release_version" => Config::get("heroku.release_version"),
"slug_description" => config("heroku.slug_description"), "slug_description" => Config::get("heroku.slug_description"),
"release_created_at" => config("heroku.release_created_at"), "release_created_at" => Config::get("heroku.release_created_at"),
"slug_commit" => config("heroku.slug_commit"), "slug_commit" => Config::get("heroku.slug_commit"),
"github_url" => preg_replace("/\/$/i", "", config("heroku.github_url", "")), "github_url" => preg_replace("/\/$/i", "", Config::get("heroku.github_url", "")),
]; ];
} }
} }