PHPackages                             devdr/api-crud-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. devdr/api-crud-generator

ActiveLibrary[API Development](/categories/api)

devdr/api-crud-generator
========================

This Package is boost your speed of you REST api creation with the exception handling

v2.0.2(3y ago)0488PHP

Since Mar 14Pushed 3y agoCompare

[ Source](https://github.com/DarshanRowdy/ApiCrudGenerator)[ Packagist](https://packagist.org/packages/devdr/api-crud-generator)[ RSS](/packages/devdr-api-crud-generator/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)DependenciesVersions (6)Used By (0)

Usage
=====

[](#usage)

Step 1: Install through Composer
--------------------------------

[](#step-1-install-through-composer)

```
composer require devdr/api-crud-generator
```

Step 2: Add new Service Provider in config/app.php inside the providers\[\] array:
----------------------------------------------------------------------------------

[](#step-2-add-new-service-provider-in-configappphp-inside-the-providers-array)

```
DevDr\ApiCrudGenerator\DrCrudServiceProvider::class
```

Step 3: User "crud:api-generator" for the crud creation
-------------------------------------------------------

[](#step-3-user-crudapi-generator-for-the-crud-creation)

FYI: Please make sure the parameter should be same as your table name Ex: if the table name is user then you can use command as bellow.

This command generate Model file, Request File, Resource controller file for api and also add resource routes into api.php

```
php artisan crud:api-generator User
```

Step 4: Add this line into your "app/Http/Kernel.php" $routeMiddleware\[\]
--------------------------------------------------------------------------

[](#step-4-add-this-line-into-your-apphttpkernelphp-routemiddleware)

```
'api.auth' => \DevDr\ApiCrudGenerator\Middleware\CheckAuth::class,
```

Now you can use this 'api.auth' middleware anywhere

#### You can pass the "AUTH-TOKEN" in api headers for the check authentication

[](#you-can-pass-the-auth-token-in-api-headers-for-the-check-authentication)

Step 5: After using middleware that in that function you can use the user object by this
----------------------------------------------------------------------------------------

[](#step-5-after-using-middleware-that-in-that-function-you-can-use-the-user-object-by-this)

```
$user = $request->get('users');
```

Step 8: Add this function in the Users Model
--------------------------------------------

[](#step-8-add-this-function-in-the-users-model)

```
public static function findIdentityByAccessToken($token, $type = null)
{
    return static::where(['auth_token' => $token])->first();
}
```

#### OR

[](#or)

without middleware you can use bellow function into the direct controller api action

```
$user = $this->_checkAuth();
```

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

##### Enjoy Code :)

[](#enjoy-code-)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

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

Total

5

Last Release

1205d ago

Major Versions

1.0.0.x-dev → 2.0.0.x-dev2023-03-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46758396?v=4)[DRINFOSTACKS](/maintainers/DarshanRowdy)[@DarshanRowdy](https://github.com/DarshanRowdy)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/devdr-api-crud-generator/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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