-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8608d11
commit c23b4b8
Showing
2 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php /** @noinspection PhpUnused */ | ||
|
||
namespace HichemtabTech\TokensValidation\Laravel\stubs; | ||
|
||
use HichemtabTech\TokensValidation\TokensValidation; | ||
use Illuminate\Support\ServiceProvider; | ||
|
||
class TokensValidationProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Register services. | ||
* | ||
* @return void | ||
*/ | ||
public function register(): void | ||
{ | ||
$this->app->singleton(TokensValidation::class, function () { | ||
return TokensValidation::class; | ||
}); | ||
} | ||
|
||
/** | ||
* Bootstrap services. | ||
* | ||
* @return void | ||
* @noinspection PhpUndefinedFunctionInspection | ||
*/ | ||
public function boot(): void | ||
{ | ||
TokensValidation::setConfig(config('tokensvalidation')); | ||
TokensValidation::prepare(); | ||
$this->app->singleton(TokensValidation::class, function () { | ||
return TokensValidation::class; | ||
}); | ||
} | ||
} |