From 9fdd3805c725fff78194037b4073a5acfb3a6229 Mon Sep 17 00:00:00 2001 From: gwleuverink Date: Mon, 19 Aug 2024 01:43:48 +0200 Subject: [PATCH] simplify binding example --- README.md | 3 ++- tests/TestCase.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f643866..34d0541 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ namespace YourPackage; use Illuminate\Support\ServiceProvider as BaseServiceProvider; use Leuverink\AssetInjector\Contracts\AssetInjector; +use YourPackage\InjectAssets; class ServiceProvider extends BaseServiceProvider { @@ -66,7 +67,7 @@ class ServiceProvider extends BaseServiceProvider { $this->app->bind( AssetInjector::class, - fn() => new \YourPackage\AssetInjector + InjectAssets::class ); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 3b1f7e3..383c7cd 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -16,7 +16,7 @@ protected function setUp(): void $this->app->bind( AssetInjector::class, - fn () => new Implement + Implement::class ); } }