PHPackages                             worksofallen/laravel-api-scaffold - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. worksofallen/laravel-api-scaffold

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

worksofallen/laravel-api-scaffold
=================================

A simple way to send batch emails

v1.3(9mo ago)01.6kMITPHPPHP ^8.1

Since Jun 4Pushed 9mo agoCompare

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

READMEChangelogDependencies (11)Versions (6)Used By (0)

Laravel API Scaffold Command
============================

[](#laravel-api-scaffold-command)

[![Status](https://camo.githubusercontent.com/263f3694f42afc27e06a1ff829cd63884893b55624e13a16893dd0a3ba772b94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d737563636573732e737667)](https://camo.githubusercontent.com/263f3694f42afc27e06a1ff829cd63884893b55624e13a16893dd0a3ba772b94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d737563636573732e737667)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](/LICENSE)[![PHP](https://camo.githubusercontent.com/55119e0553f52e25200843d20c0b7f94802872deee3c7737d4dcd41a851167c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d626c75652e737667)](https://camo.githubusercontent.com/55119e0553f52e25200843d20c0b7f94802872deee3c7737d4dcd41a851167c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d626c75652e737667)[![Latest Version on Packagist](https://camo.githubusercontent.com/e7d09bf8dea5d253b57634ed3a5a41145c7ba37500c8040cb981367a3abff23d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f726b736f66616c6c656e2f6c61726176656c2d6170692d73636166666f6c642e737667)](https://packagist.org/packages/worksofallen/laravel-api-scaffold)[![Downloads](https://camo.githubusercontent.com/ad4e1aa7caf60f84843b900a2613de127f3dfe37cd4a1d76cf1a577aa15905ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776f726b736f66616c6c656e2f6c61726176656c2d6170692d73636166666f6c642e737667)](https://packagist.org/packages/worksofallen/laravel-api-scaffold)

---

A Laravel Artisan command to quickly scaffold a complete RESTful API resource, including:

- Eloquent Model with SoftDeletes &amp; fillable setup
- Migration file with a `name` column and soft deletes support
- API Controller with basic CRUD operations &amp; pagination, filtering, sorting
- Form Request classes for validation with proper JSON error responses

---

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

[](#installation)

Require the package via Composer:

```
composer require worksofallen/laravel-api-scaffold:v1.0.0 --dev
```

Publish the command if necessary (depends on how you package it).

---

Usage
-----

[](#usage)

Run the custom Artisan command to generate a full API scaffold for a resource:

```
php artisan make:api {name}
```

Replace `{name}` with the singular model name, e.g., `Product`, `Category`, etc.

### What gets created?

[](#what-gets-created)

- `app/Models/{Name}.php` — Model with fillable `name` attribute and soft deletes.
- `database/migrations/xxxx_xx_xx_xxxxxx_create_{snake_plural}_table.php` — Migration with `name` and soft deletes columns.
- `app/Http/Requests/{Name}StoreRequest.php` — Validation request for storing.
- `app/Http/Requests/{Name}UpdateRequest.php` — Validation request for updating.
- `app/Http/Controllers/API/{Name}Controller.php` — API controller with:
- `index` method supporting search (`q`), sort (`sortField`, `sortOrder`), and pagination (`sizePerPage`).
- `store`, `show`, `update`, `destroy` methods.

---

Features
--------

[](#features)

- Standardized API scaffolding reduces repetitive boilerplate code.
- Soft deletes enabled by default.
- Search, sort, paginate support out of the box.
- JSON validation error responses for API-friendly error handling.
- Clean, maintainable, and easy to customize generated code.

---

Example
-------

[](#example)

```
php artisan make:api Product
```

Generates `Product` API scaffolding:

- Model: `app/Models/Product.php`
- Migration: `database/migrations/xxxx_xx_xx_create_products_table.php`
- Requests: `ProductStoreRequest`, `ProductUpdateRequest`
- Controller: `app/Http/Controllers/API/ProductController.php`

---

Authors
-------------------------------------------

[](#authors-)

- [Allen Alvarez](https://github.com/worksofallen)

Changelog
---------

[](#changelog)

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

Security
--------

[](#security)

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

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

[](#contributing)

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

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance58

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Every ~30 days

Total

5

Last Release

274d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelhelpergeneratorsrepositoryartisan-cli

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/worksofallen-laravel-api-scaffold/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[mckenziearts/laravel-command

A simple Laravel package to provide artisan new commands

321.2k](/packages/mckenziearts-laravel-command)

PHPackages © 2026

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