PHPackages                             usamamuneerchaudhary/laravel-api-boilerplate - 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. [Framework](/categories/framework)
4. /
5. usamamuneerchaudhary/laravel-api-boilerplate

ActiveProject[Framework](/categories/framework)

usamamuneerchaudhary/laravel-api-boilerplate
============================================

Simple Laravel API Boilerplate to create a ready-to-use REST API using Laravel Passport

1.2(6y ago)79MITPHPPHP ^7.3.7

Since Oct 28Pushed 5y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (13)Versions (4)Used By (0)

Laravel API Boilerplate using Laravel Passport
===============================================

[](#laravel-api-boilerplate-using-laravel-passport-)

Laravel API Boilerplate is a starting point for your first API.

It is built on top of:

- Laravel Framework - [laravel/laravel](https://github.com/laravel)
- Laravel Passport - [laravel/passport](https://github.com/laravel/passport)
- Laravel-CORS [barryvdh/laravel-cors](http://github.com/barryvdh/laravel-cors)

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

[](#installation)

1. run `composer create-project usamamuneerchaudhary/laravel-api-boilerplate myfirstApi`;
2. Rename `.env.example` to `.env`
3. Generate Passport encryption keys &amp; secret access tokens `php artisan passport:install`
4. Generate application key by `php artisan key:generate`
5. After DB Connection, run `php artisan migrate`. For dummy data for users, run `php artisan migrate --seed`. You can see more info in `database\seeds\UserTableSeeder.php`.
6. For Testing Emails, you can setup MailTrap.
7. Well that's it lad, it would be up and running on your server already.

Basic Requirements for the Project
----------------------------------

[](#basic-requirements-for-the-project)

1. PHP `v7.3` or greater.

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

[](#main-features)

### Ready-To-Use Authentication Controllers

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

You can find Authentication Controllers under namespace `App\Http\Controllers\API\Auth`.

### Validations

[](#validations)

There are also the validation rules for every action (login, sign up, recovery and reset) under namespace ` App\Http \Request\API\Auth`.

### Endpoints

[](#endpoints)

- Login: `POST api/v1/login`
- Register: `POST api/v1/register`
- Recover `POST api/v1/recover`
- Reset `POST api/v1/reset`
- Find Reset Token `GET api/v1/reset/{token}`
- Logout `GET api/v1/logout`
- Verify Email `api/v1/user/verify/email/{token}`

Please note that, api routes are prefixed with `v1`, you can changed this in `App\Providers\RouteServiceProvider.php`

### Separate File for Routes

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

All the API routes can be found in the `routes/api.php` file.

### Firewall

[](#firewall)

We're using [akaunting/firewall ](http://github.com/akaunting/firewall) to secure our API.

### Roles &amp; Permissions

[](#roles--permissions)

Simpler way of assigning Roles &amp; Permissions to Users. You can more details on what we've done here on [usamamuneerchaudhary/roles-permissions](https://github.com/usamamuneerchaudhary/roles-permissions)

### CRUD Scaffolding

[](#crud-scaffolding)

A Simple [CRUD Scaffolding package](https://github.com/JunaidQadirB/laravel-crud-scaffold) is being setup out of the box to keep you going without any hassle.

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

[](#creating-endpoints)

You can create your endpoints in `routes/api.php` under `auth:api` middleware group.

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.

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2389d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adb088072d2e9f335a0c37e9e5481d8d3c582ccc4b4ca721850b1e32b3a480e8?d=identicon)[usamamuneerchaudhary](/maintainers/usamamuneerchaudhary)

---

Tags

apiframeworklaravelpassportboilerplate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/usamamuneerchaudhary-laravel-api-boilerplate/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)

PHPackages © 2026

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