PHPackages                             asmiarowski/lumen-api-generator - 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. asmiarowski/lumen-api-generator

ActiveLibrary

asmiarowski/lumen-api-generator
===============================

Artisan generator for API reasource.

v0.3.0(10y ago)6812MITPHPPHP &gt;=5.5.0

Since Oct 25Pushed 10y ago3 watchersCompare

[ Source](https://github.com/asmiarowski/lumen-api-generator)[ Packagist](https://packagist.org/packages/asmiarowski/lumen-api-generator)[ Docs](https://github.com/asmiarowski/lumen-api-generator)[ RSS](/packages/asmiarowski-lumen-api-generator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

lumen-api-generator
===================

[](#lumen-api-generator)

Generates boilerplate for lumen REST API: migration, controller, model, request and route. **Generator creates Eloquent Models and use them in generated controllers. If you want to use this package you are encouraged to uncomment `$app->withEloquent` in `bootstrap/app.php`.**

### Installation

[](#installation)

``` composer require --dev asmiarowski/lumen-api-generator ``` Add this to app\\Providers\\AppServiceProvider inside register() method:

``` if ($this-&gt;app-&gt;environment() == 'local') { $this-&gt;app-&gt;register('Smiarowski\\Generators\\GeneratorsServiceProvider'); } ``` Uncomment in `bootstrap/app.php`

``` $app-&gt;register(App\\Providers\\AppServiceProvider::class); ``` For POST / PUT data to work you either have to send your request with `Accept: application/json` header or set up json responses globally in app/Http/Requests/Request.php like so: ``` /\*\* \* Overwrite Laravel Request method because API is always returning json \* @return bool \*/ public function wantsJson() { return true; } ``` ### Command syntax

[](#command-syntax)

``` php artisan make:api-resource --schema=":():(); \[...\]" --softdeletes ``` ### Command options

[](#command-options)

\--schema - required, schema of your migration, validators will be set based on fields and types specified.

\--softdeletes - optional, add softDeletes() to migration

### Column types

[](#column-types)

### Custom types

[](#custom-types)

\- email - puts string type column in your migration and email validation for your request

### Column options

[](#column-options)

foreign, index, unique, default, nullable, first, after, unsigned

### Example command

[](#example-command)

``` php artisan make:api-resource emails --schema="email:email:unique; title:string; body:text; status:integer:default(1); user\_id:integer:foreign(users)" --softdeletes ``` Creates:

app/Http/Controllers/EmailController.php

app/Htpp/Requests/EmailRequest.php

app/Email.php

database/migrations/\*timestamp\*\_create\_emails\_table.php

And appends resource routes to app/routes.php with pattern for id of the resource.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

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 ~73 days

Total

3

Last Release

3706d ago

PHP version history (2 changes)v0.1.1PHP &gt;=5.4.0

v0.2.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fe48213474d996b4bcab24c28e02f082b1f7707fc27480f81f69a20414f31f6?d=identicon)[asmiarowski](/maintainers/asmiarowski)

---

Top Contributors

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

---

Tags

lumengeneratorsREST API

### Embed Badge

![Health badge](/badges/asmiarowski-lumen-api-generator/health.svg)

```
[![Health](https://phpackages.com/badges/asmiarowski-lumen-api-generator/health.svg)](https://phpackages.com/packages/asmiarowski-lumen-api-generator)
```

###  Alternatives

[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[wn/lumen-generators

A collection of generators for Lumen and Laravel 5.

350205.3k2](/packages/wn-lumen-generators)[ktquez/laravel-tinymce

TinyMCE editor for Laravel and Lumen Framework

2525.4k](/packages/ktquez-laravel-tinymce)[vluzrmos/collective-html

LaravelCollective Html and Form builder for Lumen.

2523.9k](/packages/vluzrmos-collective-html)

PHPackages © 2026

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