ammadeuss/laravel-jwt

Laravel 对 lcobucci/jwt 包的封装

v1.0 2017-03-14 05:09 UTC

This package is not auto-updated.

Last update: 2024-09-18 20:09:58 UTC


README

Laravel 对 lcobucci/jwt 包的封装

安装

使用 composer 安装此包

composer require ammadeuss/laravel-jwt

您需要在 app.php 中添加服务提供者

Ammadeuss\LaravelJwt\ServiceProvider::class,

如果您想使用外观,请在 app.php 中的外观中添加以下内容

'Jwt' => Ammadeuss\LaravelJwt\JwtFacade::class,
'JwtValidation' => Ammadeuss\LaravelJwt\JwtValidationFacade::class,

用法

$token = Jwt::createBuilder()->with('uid', 1);