PHPackages                             mk990/mkapi - 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. mk990/mkapi

ActiveLibrary[API Development](/categories/api)

mk990/mkapi
===========

api helper for laravel

v0.1.3(11mo ago)23181LGPL-3.0-or-laterPHPPHP &gt;=8.3

Since Nov 17Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/mk990/mkapi)[ Packagist](https://packagist.org/packages/mk990/mkapi)[ Docs](https://github.com/mk990/mkapi)[ RSS](/packages/mk990-mkapi/feed)WikiDiscussions master Synced 1mo ago

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

MkApi
=====

[](#mkapi)

[![GitHub stars](https://camo.githubusercontent.com/5dd6f6e6a8c20452b22cb37b67a8ca2d0325c9b73b51c871c220b9d1d5a6ed29/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d6b3939302f4d6b4170693f7374796c653d736f6369616c)](https://github.com/mk990/MkApi)

[![GitHub license](https://camo.githubusercontent.com/185d8a5890251df63f38d7b06b719777a921d824403737b1d438e603af37a838/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6b3939302f4d6b417069)](https://github.com/mk990/MkApi/blob/main/LICENSE)

---

[![MkApi Logo](./logo.jpg)](./logo.jpg)

🚀 API Development with Laravel MkApi
====================================

[](#-api-development-with-laravel-mkapi)

**MkApi** is a Laravel-based CLI tool that simplifies API development by generating essential files like models, controllers, and Swagger documentation — all with a single command. It’s designed to help you build faster, cleaner, and more documented APIs. 🧰✨

---

📦 Packages Used
---------------

[](#-packages-used)

This project utilizes the following packages to boost development and maintain high standards:

📦 Package Name📝 Description🔢 Version`l5-swagger`Swagger API documentation generator for Laravel.^8.6`jwt-auth`JSON Web Token (JWT) authentication for secure APIs.^2.7`larastan`Static analysis tool to catch bugs early using PHPStan for Laravel.^3.0`laravel-backup`Seamless backup of databases and files in Laravel apps.^9.1`laravel-pulse`Real-time performance insights for Laravel applications.^1.4`laravel-telescope`Debugging assistant for Laravel. Monitors requests, logs, queries, mail, jobs, and more.^5.8`laravel-persian-validation`Persian-specific validation rules for form requests.^2.0`verta`Date handling between Solar and Gregorian calendars.^8.5`turnstile`Easy integration with Cloudflare Turnstile for bot protection.^2.0---

⚙️ Installation
---------------

[](#️-installation)

### 📥 Install MkApi Tool

[](#-install-mkapi-tool)

```
composer require mk990/mkapi --dev
php artisan install:mkapi
```

🔧 The following packages are installed by default:

- `l5-swagger`
- `jwt-auth`
- `larastan`

---

### 🎛️ Install Optional Packages

[](#️-install-optional-packages)

Use the interactive install command to choose additional tools:

```
php artisan install:mkapi --package
```

📌 Available packages:

- `laravel-backup`
- `laravel-pulse`
- `laravel-telescope`
- `laravel-persian-validation`
- `verta`
- `turnstile`

---

🛠️ Usage
--------

[](#️-usage)

MkApi provides easy-to-use artisan commands to generate models and controllers with Swagger support.

### 🧱 Generate a Model

[](#-generate-a-model)

```
php artisan mkapi:Model YOUR_MODEL_NAME
```

✅ Examples:

```
php artisan mkapi:Model product
php artisan mkapi:Model all
```

---

### 🎮 Generate a Controller

[](#-generate-a-controller)

```
php artisan mkapi:Controller YOUR_CONTROLLER_NAME
```

✅ Examples:

```
php artisan mkapi:Controller product
php artisan mkapi:Controller all
```

---

🧩 Command Options
-----------------

[](#-command-options)

### 🔁 `--force`: Overwrite Existing Files

[](#---force-overwrite-existing-files)

```
php artisan mkapi:Model product --force
```

This will replace any existing `ProductModel.php` file.

---

### 🧾 `--code`: Add Swagger Documentation &amp; Controller Logic

[](#---code-add-swagger-documentation--controller-logic)

```
php artisan mkapi:Controller product --code
```

🧠 Example generated method in `ProductController.php`:

```
public function store(Request $request): JsonResponse
{
    $validated = $request->validate([
        'name' => 'required|string|max:255',
    ]);

    try {
        return $this->success(Product::create($validated));
    } catch (Exception $e) {
        Log::error($e->getMessage());
        return $this->error('create error');
    }
}
```

➡️ Explore more generated methods in the [TestController](https://github.com/mk990/mkapi/blob/master/src/TestController.php) file.

---

🤝 Contributing
--------------

[](#-contributing)

We love contributions! If you have ideas or improvements, feel free to:

- 📌 [Create an Issue](https://github.com/mk990/MkApi/issues)
- 🚀 [Submit a Pull Request](https://github.com/mk990/MkApi/pulls)

---

📝 License
---------

[](#-license)

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

---

👥 Contributors
--------------

[](#-contributors)

- 👨‍💻 [mk990](https://github.com/mk990)
- 👨‍💻 [Emad Shirzad](https://github.com/Emadshirzad)

---

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance51

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~18 days

Recently: every ~13 days

Total

12

Last Release

341d ago

PHP version history (2 changes)0.0.1PHP &gt;=8.2

v0.0.9PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/700bfc3c90ebf9ab6c82bdd823ca843b7b0f7602aed9b259ab5cf60cff7bb509?d=identicon)[mk990](/maintainers/mk990)

---

Top Contributors

[![mk990](https://avatars.githubusercontent.com/u/18666678?v=4)](https://github.com/mk990 "mk990 (24 commits)")[![Emadshirzad](https://avatars.githubusercontent.com/u/141444183?v=4)](https://github.com/Emadshirzad "Emadshirzad (16 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mk990-mkapi/health.svg)

```
[![Health](https://phpackages.com/badges/mk990-mkapi/health.svg)](https://phpackages.com/packages/mk990-mkapi)
```

###  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)
