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. [API Development](/categories/api)
4. /
5. asmiarowski/lumen-api-generator

ActiveLibrary[API Development](/categories/api)

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 3w 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 41% 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

3755d ago

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

v0.2.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6830139?v=4)[Artur Śmiarowski](/maintainers/asmiarowski)[@asmiarowski](https://github.com/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

[spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

1.9k15.7M112](/packages/spatie-laravel-fractal)[flugger/laravel-responder

A Laravel Fractal package for building API responses, giving you the power of Fractal and the elegancy of Laravel.

8901.6M5](/packages/flugger-laravel-responder)[mollie/laravel-mollie

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

3634.4M33](/packages/mollie-laravel-mollie)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3322.4M3](/packages/darkaonline-swagger-lume)[airesvsg/acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API

1.4k77.2k](/packages/airesvsg-acf-to-rest-api)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

99620.0k3](/packages/vluzrmos-slack-api)

PHPackages © 2026

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