Skip to content

Commit

Permalink
singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
noemimpimentel committed Dec 11, 2023
1 parent 7bedd02 commit e2e8b87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/IssJuridicoServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ public function configurePackage(Package $package): void
//->hasMigration('create_iss-juridico_table')
//->hasCommand(IssJuridicoCommand::class);
}

public function register(): void
{
parent::register();

$this->app->singleton('iss-juridico', fn ($app, $args) => new IssJuridico($args[0] ?? request()->bearerToken()));
}

}

0 comments on commit e2e8b87

Please sign in to comment.