PHPackages                             uccello/uccello-api - 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. [API Development](/categories/api)
4. /
5. uccello/uccello-api

ActiveLibrary[API Development](/categories/api)

uccello/uccello-api
===================

A REST API for Uccello.

v2.0.11(4y ago)0318MITPHP

Since Sep 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/uccellolabs/uccello-api)[ Packagist](https://packagist.org/packages/uccello/uccello-api)[ RSS](/packages/uccello-uccello-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (25)Used By (0)

Install package
===============

[](#install-package)

```
composer require uccello/uccello-api

```

Config JWT
==========

[](#config-jwt)

Publish the config
------------------

[](#publish-the-config)

Run the following command to publish the package config file:

```
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
```

You should now have a config/jwt.php file that allows you to configure the basics of this package.

Generate secret key
-------------------

[](#generate-secret-key)

I have included a helper command to generate a key for you:

```
php artisan jwt:secret
```

This will update your .env file with something like JWT\_SECRET=foobar

It is the key that will be used to sign your tokens. How that happens exactly will depend on the algorithm that you choose to use.

Update your User model
----------------------

[](#update-your-user-model)

Firstly you need to implement the Tymon\\JWTAuth\\Contracts\\JWTSubject contract on your User model, which requires that you implement the 2 methods getJWTIdentifier() and getJWTCustomClaims().

The example below should give you an idea of how this could look. Obviously you should make any changes, as necessary, to suit your own needs.

```
