PHPackages                             toshim45/laravel-reverse-mysql - 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. [Database &amp; ORM](/categories/database)
4. /
5. toshim45/laravel-reverse-mysql

ActivePackage[Database &amp; ORM](/categories/database)

toshim45/laravel-reverse-mysql
==============================

generate crud from mysql table

v0.3.1(4y ago)0148MITPHPPHP &gt;=7.0.0

Since Mar 9Pushed 4y ago2 watchersCompare

[ Source](https://github.com/toshim45/laravel-reverse-mysql)[ Packagist](https://packagist.org/packages/toshim45/laravel-reverse-mysql)[ RSS](/packages/toshim45-laravel-reverse-mysql/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (6)Used By (0)

laravel-reverse-mysql
=====================

[](#laravel-reverse-mysql)

laravel package, basically reverse field from mysql into controller + views, just like crud generator, but with your theme, just provide the stubs.

Why ?
-----

[](#why-)

- need custom theme, we just provide simple html stub, edit as you need
- need a lot of additional code after generate
- need generator which simply read your database fields
- no code bloat, no helper files, it just your model, controller and crud blades

Do not use this
---------------

[](#do-not-use-this)

- if you need generator with migration included, because this reverse code from mysql
- if you just need crud without additional code
- if you do not have concern on provided themes

Requirements
------------

[](#requirements)

- Laravel 5.\* or 6.\* or 8.\*
- [Laravel Collective](https://laravelcollective.com)
- Your table must contains id &amp; timestamp

Installation
------------

[](#installation)

```
composer require toshim45/laravel-reverse-mysql

```

then publish the `stubs`

```
php artisan vendor:publish --provider="Toshim45\LaravelReverseMysql\ServiceProvider" --tag=stubs-bootstrap5

```

your `stubs` will be placed in `resources` folder, edit as you need, simple `stubs` provided for you, for simplest stub use `--tag=stubs`, also for other stubs see [example](#stub-example) stubs below.

Do all generation **before you add some codes** to your new model &amp; controller

How To
------

[](#how-to)

### Basic Usage

[](#basic-usage)

- generate model with `php artisan make:model {ModelName} -mcr` options, make sure your model name is **singular** [PascalCase](http://wiki.c2.com/?PascalCase)
- run `php artisan reverse:mysql {table-name} -c -r` , table name is usually plural [snake\_case](https://en.wikipedia.org/wiki/Snake_case)
- there is option `--hard-reset` to replace all table related MVC files, use it if needed
- run `phpfmt` or other php formatter
- add this resources to routes
    - for laravel 8 pls adjust the import

### Custom Stub

[](#custom-stub)

- generate model with `php artisan make:model {ModelName} -mcr` options, make sure your model name is **singular** [PascalCase](http://wiki.c2.com/?PascalCase)
- update content `resources/stubs`, keep `{{tableName}}`, `{{tableUrlName}}` and `{{tableContent}}` variables, which is used by this generator, var `{{tableFilter}}` will create filter with equal query, you can change query at model class.
- run `php artisan reverse:mysql {table_name} -c -r`, table name is usually plural [snake\_case](https://en.wikipedia.org/wiki/Snake_case)
- run `phpfmt` or other php formatter
- add this resources to routes
    - for laravel 8 pls adjust the import

### Reserved variables

[](#reserved-variables)

- tableName
- tableUrlName
- tableContent
- tableTitle
- tableTotal

### Stub Example

[](#stub-example)

pls check github [examples](https://github.com/toshim45/laravel-reverse-mysql/tree/master/examples) and copy paste folder content from one of these, into resources/stubs folder:

- [jeroennoten-adminlte](https://github.com/jeroennoten/Laravel-AdminLTE/tree/laravel5-adminlte2) stub, install jeroennoten-adminlte package before generating crud

Notes
-----

[](#notes)

- Tested on OSX, need help for other OS
- Tested on laravel 5.6, 5.8, 6.*, 8.* need help for 7 (i dont think will support for 4.\*)
- For code formatting I'm working on formatting generated code, but for now you can use your IDE, already tried some code formatter, almost of them install binary in your vendor folder, I thought that is inappropriate, so just use your IDE formatter
- only support mysql

TODO (Need Help)
----------------

[](#todo-need-help)

- laravel 7
- form.stub so u will be able to customize input type field class
- do u have any ideas ?

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

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

Total

5

Last Release

1755d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelgeneratormysqlcrud

### Embed Badge

![Health badge](/badges/toshim45-laravel-reverse-mysql/health.svg)

```
[![Health](https://phpackages.com/badges/toshim45-laravel-reverse-mysql/health.svg)](https://phpackages.com/packages/toshim45-laravel-reverse-mysql)
```

PHPackages © 2026

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