Skip to content

Commit

Permalink
Merge pull request #9 from worksome/feature/deferrable-provider
Browse files Browse the repository at this point in the history
feat: change to deferrable provider
  • Loading branch information
owenvoke authored Sep 6, 2024
2 parents 9d80963 + 5eb2cb7 commit 141c761
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/UkTaxAllowanceServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@

namespace Worksome\UkTaxAllowance;

use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
use Worksome\UkTaxAllowance\Calendars\YasumiUkCalendar;
use Worksome\UkTaxAllowance\Contracts\UkCalendar;

class UkTaxAllowanceServiceProvider extends ServiceProvider
class UkTaxAllowanceServiceProvider extends ServiceProvider implements DeferrableProvider
{
public function register(): void
{
$this->app->bind(UkCalendar::class, function () {
return new YasumiUkCalendar();
});
}

/** @return array<class-string> */
public function provides(): array
{
return [UkCalendar::class];
}
}

0 comments on commit 141c761

Please sign in to comment.