PHPackages                             asif/table-to-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. asif/table-to-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

asif/table-to-api
=================

a laravel package that creates rest api for a certain table. It generates scaffolding for rest api

1.0.1(2y ago)08MITPHP

Since Jul 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/asifzcpe/table2api)[ Packagist](https://packagist.org/packages/asif/table-to-api)[ RSS](/packages/asif-table-to-api/feed)WikiDiscussions main Synced 1mo ago

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

table-to-api generator
======================

[](#table-to-api-generator)

table2api is a laravel package that creates rest api for a certain table. It generates scaffolding for rest api.

- It generates controller,model,request and route for a certain table to work like rest api

Installing table-to-api
=======================

[](#installing-table-to-api)

The recommended way to install table-to-api is through [Composer](https://getcomposer.org/).

```
composer require asifzcpe/table-to-api
```

Setting up the package in laravel project
=========================================

[](#setting-up-the-package-in-laravel-project)

1. Run following artisan command shipped with this package

```
php artisan table2api:generate YOUR_TABLE_NAME
```

if table exists in database it generates following scaffolding:

[![Image of table-to-api](https://raw.githubusercontent.com/asifzcpe/table2api/master/docs/Screenshot%20from%202020-03-13%2000-26-21.png)](https://raw.githubusercontent.com/asifzcpe/table2api/master/docs/Screenshot%20from%202020-03-13%2000-26-21.png)

2. Inserting api namespace in composer.json file like the following:

```
 "psr-4": {
     "App\\": "app/",
     "Api\\V1\\":"api/v1/"
  },
```

3. Run following command to autoload

```
composer dumpautoload
```

```
php artisan cache:clear
php artisan clear-compiled
```

4. Run following command to see generated api routes

```
  php artisan route:list
```

and it will show like this (users table in my case) [![Image of route lists](https://raw.githubusercontent.com/asifzcpe/table2api/master/docs/Screenshot%20from%202020-03-13%2000-49-09.png)](https://raw.githubusercontent.com/asifzcpe/table2api/master/docs/Screenshot%20from%202020-03-13%2000-49-09.png)

### It is done. Now, you can hit the urls to get json data as rest api

[](#it-is-done-now-you-can-hit-the-urls-to-get-json-data-as-rest-api)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

2

Last Release

1024d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

curlweb serviceREST APIapi-generatortable to api generator

### Embed Badge

![Health badge](/badges/asif-table-to-api/health.svg)

```
[![Health](https://phpackages.com/badges/asif-table-to-api/health.svg)](https://phpackages.com/packages/asif-table-to-api)
```

###  Alternatives

[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

45912.1M55](/packages/eightpoints-guzzle-bundle)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[zoonman/pixabay-php-api

PixabayClient is a PHP HTTP client library to access Pixabay's API

3354.7k](/packages/zoonman-pixabay-php-api)[jshensh/php-curl-class

PHP HTTP client, based on cURL

532.8k](/packages/jshensh-php-curl-class)

PHPackages © 2026

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