PHPackages                             codeforyou/laravel-jwt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. codeforyou/laravel-jwt

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

codeforyou/laravel-jwt
======================

jwt auth for laravel

v1.0.0(7y ago)113MITPHPPHP &gt;=7.0.0

Since Aug 12Pushed 7y agoCompare

[ Source](https://github.com/jerrygaoyang/codeforyou-laravel-jwt)[ Packagist](https://packagist.org/packages/codeforyou/laravel-jwt)[ RSS](/packages/codeforyou-laravel-jwt/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

codeforyou-laravel-jwt
======================

[](#codeforyou-laravel-jwt)

Installation
------------

[](#installation)

- First: Require this package with composer using the following command

```
composer require codeforyou/laravel-jwt

```

- Second: add the service provider to the providers array in config/app.php

```
Codeforyou\Auth\Providers\JwtProvider::class,

```

- Last: publish jwt config to laravel config path

```
php artisan vendor:publish --provider="Codeforyou\Auth\Providers\JwtProvider"

```

Configuration
-------------

[](#configuration)

- add the JWT middleware to the routeMiddleware array in app/Http/Kenel.php

```
'jwt' => \Codeforyou\Auth\Middleware\JwtMiddleware::class,

```

- JWT config in config/jwt.php

```
