PHPackages                             jafar690/laravel-api-jwt-starter - 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. jafar690/laravel-api-jwt-starter

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

jafar690/laravel-api-jwt-starter
================================

Laravel API boilerplate with jwt authentication

25PHP

Since Jul 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jafar690/laravel-api-jwt-starter)[ Packagist](https://packagist.org/packages/jafar690/laravel-api-jwt-starter)[ RSS](/packages/jafar690-laravel-api-jwt-starter/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)

Laravel API JWT Starter
-----------------------

[](#laravel-api-jwt-starter)

Laravel API JWT Starter is a "starter kit" you can use to build your first API in seconds. It is based on larave 5.4!

It is built on top of three packages:

- JWT-Auth - [tymondesigns/jwt-auth](https://github.com/tymondesigns/jwt-auth)
- Dingo API - [dingo/api](https://github.com/dingo/api)
- Laravel-CORS [barryvdh/laravel-cors](http://github.com/barryvdh/laravel-cors)

What I made is an integration of these three packages and a setup of some authentication and credentials recovery methods.

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

[](#installation)

1. run `composer create-project jafar690/laravel-api-jwt-starter yourProjectName`;
2. have a coffee, nothing to do here;

Once the project creation procedure will be completed, run the `php artisan migrate` command to install the required tables.

Main Features
-------------

[](#main-features)

### Ready-To-Use Authentication Controllers

[](#ready-to-use-authentication-controllers)

You don't have to worry about authentication and password recovery anymore. I created four controllers you can find in the `App\Http\Controllers\Auth\` for those operations.

For each controller there's an already setup route in `routes/api.php` file:

- `POST api/auth/login`, to do the login and get your access token;
- `POST api/auth/register`, to create a new user into your application;
- `POST api/auth/recovery`, to recover your credentials;
- `POST api/auth/reset`, to reset your password after the recovery;

### A Separate File for Routes

[](#a-separate-file-for-routes)

All the API routes can be found in the `routes/api.php` file. This also follow the Laravel 5.3 convention.

### On create project commands

[](#on-create-project-commands)

Every time you create a new project starting from this repository,the `php artisan jwt:generate` command will be executed.

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

[](#configuration)

This boilerplate is based on *dingo/api* and *tymondesigns/jwt-auth* packages. So, you can find many informations about configuration [here](https://github.com/tymondesigns/jwt-auth/wiki/Configuration) and [here](https://github.com/dingo/api/wiki/Configuration).

I have made some minor changes to the DINGO API configuration file in *config/api.php*

- `sign_up.release_token`: set it to `true` if you want your app release the token right after the sign up process;
- `reset_password.release_token`: set it to `true` if you want your app release the token right after the password reset process;

I have also created form requests for every action (login, register, recovery and reset). Feel free to customize it for your needs.

Creating Endpoints
------------------

[](#creating-endpoints)

You can create endpoints in the same way you could to with using the single *dingo/api* package. You can [read its documentation](https://github.com/dingo/api/wiki/Creating-API-Endpoints) for details. After all, that's just a boilerplate! :)

However, I added some example routes to the `routes/api.php` file to give you immediately an idea.

Cross Origin Resource Sharing
-----------------------------

[](#cross-origin-resource-sharing)

If you want to enable CORS for a specific route or routes group, you just have to use the *cors* middleware on them.

Thanks to the *barryvdh/laravel-cors* package, you can handle CORS easily. Just check [the docs at this page](https://github.com/barryvdh/laravel-cors) for more info.

Feedback
--------

[](#feedback)

For any questions or feedback, feel free to send me an email at

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17546030?v=4)[Benjamin Gakami](/maintainers/jafar690)[@jafar690](https://github.com/jafar690)

---

Top Contributors

[![jafar690](https://avatars.githubusercontent.com/u/17546030?v=4)](https://github.com/jafar690 "jafar690 (9 commits)")

### Embed Badge

![Health badge](/badges/jafar690-laravel-api-jwt-starter/health.svg)

```
[![Health](https://phpackages.com/badges/jafar690-laravel-api-jwt-starter/health.svg)](https://phpackages.com/packages/jafar690-laravel-api-jwt-starter)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
