Skip to content

Commit

Permalink
Updated Building JWTs example
Browse files Browse the repository at this point in the history
  • Loading branch information
little-apps committed May 20, 2023
1 parent 8d0294a commit 0e12d63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ php artisan littlejwt:phrase
use LittleApps\LittleJWT\Facades\LittleJWT;
use LittleApps\LittleJWT\Build\Builder;

$token = LittleJWT::createToken(function (Builder $builder) {
$jwt = LittleJWT::create(function (Builder $builder) {
$builder
// Adds claim 'abc' with value 'def' to header claims.
->abc('def', true)
Expand All @@ -57,6 +57,7 @@ $token = LittleJWT::createToken(function (Builder $builder) {
->nop('qrs', false);
});

$token = (string) $jwt;
// $token = "ey...";
```

Expand Down

0 comments on commit 0e12d63

Please sign in to comment.