PHPackages                             juststeveking/laravel-api-toolkit - 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. juststeveking/laravel-api-toolkit

ActiveLibrary[API Development](/categories/api)

juststeveking/laravel-api-toolkit
=================================

A toolkit for creating APIs in Laravel

v1.0.0(5y ago)25456↓25%4MITPHPPHP ^7.4|^8.0

Since Dec 16Pushed 4y agoCompare

[ Source](https://github.com/JustSteveKing/laravel-api-toolkit)[ Packagist](https://packagist.org/packages/juststeveking/laravel-api-toolkit)[ GitHub Sponsors](https://github.com/JustSteveKing)[ RSS](/packages/juststeveking-laravel-api-toolkit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

A toolkit for creating APIs in Laravel
======================================

[](#a-toolkit-for-creating-apis-in-laravel)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/49de24ab087ab125228c46b940bdb2adef5a91dd4dff801d36ac1eafa47cd293/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a75737473746576656b696e672f7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Latest Version on Packagist](https://camo.githubusercontent.com/7f8153d2a580ea750c6a625146e1aa7d2e00972f08cddf45dbf5cd8e59a3dadd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75737473746576656b696e672f6c61726176656c2d6170692d746f6f6c6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juststeveking/laravel-api-toolkit)[![Tests](https://github.com/JustSteveKing/laravel-api-toolkit/workflows/Tests/badge.svg)](https://github.com/JustSteveKing/laravel-api-toolkit/workflows/Tests/badge.svg)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4e59efb7da7952c8a0e336c1eb53d112fd4a991b1cf933b1de00896ddd5e0a5f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a75737453746576654b696e672f6c61726176656c2d6170692d746f6f6c6b69742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/JustSteveKing/laravel-api-toolkit/?branch=main)[![Total Downloads](https://camo.githubusercontent.com/17303030c0dcafb42cc5950eb8a1b63be62bff098bb44abb045f2df439121730/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75737473746576656b696e672f6c61726176656c2d6170692d746f6f6c6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juststeveking/laravel-api-toolkit)

A toolkit for creating APIs in Laravel.

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

[](#installation)

You can install the package via composer:

```
composer require juststeveking/laravel-api-toolkit
```

You can publish the config file with:

```
php artisan vendor:publish --provider="JustSteveKing\Laravel\ApiToolkit\ApiToolkitServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'resource_name' => '%sResource',
    'policy_name' => '%sPolicy',
    'seeder_name' => '%sSeeder',
    'controllers' => [
        [
            'name' => 'IndexController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'CreateController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'ShowController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'UpdateController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'DeleteController',
            'options' => [
                '--invokable',
            ]
        ],
    ],
    'form_requests' => [
        'CreateRequest',
        'UpdateRequest',
    ],
];
```

Usage
-----

[](#usage)

To get starteed using this, there is only one command you really need to worry about: `api-toolkit:resource`.

The only option you need to pass it is the eloquent Model you wish to create and create the APi blueprint for.

```
php artisan api-toolkit:resource Post
```

The above command will generate:

- `app/Models/Post.php`
- `app/Policies/PostPolicy.php` - Class name can be altered in config
- `app/Http/Resources/PostResource.php` - Class name can be altered in config
- `app/Http/Requests/Api/Post/CreateRequest.php` - Class name can be altered in config
- `app/Http/Requests/Api/Post/UpdateRequest.php` - Class name can be altered in config
- `app/Http/Controllers/Post/IndexController.php` - Class name can be altered in config
- `app/Http/Controllers/Post/CreateController.php` - Class name can be altered in config
- `app/Http/Controllers/Post/ShowController.php` - Class name can be altered in config
- `app/Http/Controllers/Post/UpdateController.php` - Class name can be altered in config
- `app/Http/Controllers/Post/DeleteController.php` - Class name can be altered in config
- `database/seeds/PostSeeder.php` - Class name can be altered in config
- `database/factories/PostFactory.php`
- `database/migrations/xxxx_xx_xx_xxxxxx_create_posts_table.php`

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Steve McDougall](https://github.com/JustSteveKing)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.1% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1972d ago

### Community

Maintainers

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

---

Top Contributors

[![JustSteveKing](https://avatars.githubusercontent.com/u/6368379?v=4)](https://github.com/JustSteveKing "JustSteveKing (39 commits)")[![stephenjude](https://avatars.githubusercontent.com/u/31182887?v=4)](https://github.com/stephenjude "stephenjude (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/juststeveking-laravel-api-toolkit/health.svg)

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

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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