PHPackages                             nicoaudy/laravelmanthra - 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. [Admin Panels](/categories/admin)
4. /
5. nicoaudy/laravelmanthra

ActiveLibrary[Admin Panels](/categories/admin)

nicoaudy/laravelmanthra
=======================

Laravel Manthra For Lazy Developer

2.2(6y ago)302.0k8[3 issues](https://github.com/nicoaudy/laravelmanthra/issues)[1 PRs](https://github.com/nicoaudy/laravelmanthra/pulls)MITPHPPHP ^7.0

Since Apr 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nicoaudy/laravelmanthra)[ Packagist](https://packagist.org/packages/nicoaudy/laravelmanthra)[ Docs](https://github.com/nicoaudy/laravelmanthra)[ RSS](/packages/nicoaudy-laravelmanthra/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (19)Used By (0)

LaravelManthra
==============

[](#laravelmanthra)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c30596efb629d6aaa97794d15751da360e0fee29e2afd7f2222666c3d0141e05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636f617564792f6c61726176656c6d616e746872612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nicoaudy/laravelmanthra)[![Total Downloads](https://camo.githubusercontent.com/5dc8731e270244498724930fc3084410cd6327d14db7edeb15562353d516e6c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e69636f617564792f6c61726176656c6d616e746872612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nicoaudy/laravelmanthra)

[![screenshot.png](screenshot.png)](screenshot.png)[![manthra.gif](manthra.gif)](manthra.gif)

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

[](#installation)

Via Composer

```
$ composer require nicoaudy/laravelmanthra dev-master
```

Install **laravelcollective/html** form helper packages for if you haven't installed yet.

```
$ composer require laravelcollective/html
```

```
$ composer dump-autoload
```

Publish vendor files of this package.

```
$ php artisan vendor:publish
```

Generator GUI
-------------

[](#generator-gui)

If you want to generate using gui, manthra will provide you with generator gui you can view in `/manthra`.

You can modified your `/manthra` to append middleware with forcing default route to your custom route.

```
    // manthra controller
    $manthraNamespace = 'NicoAudy\LaravelManthra\Http\Controllers\ManthraController@index';

    // your custom route
    Route::get('/manthra', $manthraNamespace)->middleware('auth');
```

Commands
--------

[](#commands)

### Complete (web and api)

[](#complete-web-and-api)

Generate crud scaffold web and api you may use this command, for example :

```
php artisan manthra:complete Cat --fields="name#string;age#integer; type#select#options=persian,maine coon,bengal; is_male#boolean" --view-path=pet --controller-namespace=Pet --route-group=pet --model-namespace=Models
```

### Web

[](#web)

Generate crud scaffold web only you may use this command, for example :

```
php artisan manthra:web Cat --fields="name#string;age#integer; type#select#options=persian,maine coon,bengal; is_male#boolean" --view-path=pet --controller-namespace=Pet --route-group=pet --model-namespace=Models
```

### Api

[](#api)

Generate crud scaffold api only you may use this command, the difference between web and api just `(--view-path=)` flag, for example :

```
php artisan manthra:api Cat --fields="name#string;age#integer; type#select#options=persian,maine coon,bengal; is_male#boolean" --controller-namespace=Pet --route-group=pet --model-namespace=Models
```

---

Options:

OptionDescription`--fields`Fields name for the form &amp; migration. e.g. `--fields="title#string; content#text; category#select#options=technology,tips,health; user_id#integer#unsigned"``--route`Include Crud route to routes.php? yes or no`--pk`The name of the primary key`--view-path`The name of the view path`--controller-namespace`The namespace of the controller - sub directories will be created`--model-namespace`The namespace that the model will be placed in - directories will be created`--route-group`Prefix of the route group`--pagination`The amount of models per page for index pages`--indexes`The fields to add an index to. append "#unique" to a field name to add a unique index. Create composite fields by separating fieldnames with a pipe (``` --indexes="title,field1`--foreign-keys`Any foreign keys for the table. e.g. `--foreign-keys="user_id#id#users#cascade"` where user\_id is the column name, id is the name of the field on the foreign table, users is the name of the foreign table, and cascade is the operation 'ON DELETE' together with 'ON UPDATE'`--validations`Validation rules for the form "col\_name#rules\_set" e.g. ``` "title#min:10`--relationships`The relationships for the model. e.g. `--relationships="comments#hasMany#App\Comment"` in the format`--localize`Allow to localize. e.g. localize=yes`--locales`Locales language type. e.g. locals=en---

#### Other commands (optional):

[](#other-commands-optional)

For controller:

- Standard Version

```
php artisan manthra:controller PostsController --crud-name=posts --model-name=Post --view-path="directory" --route-group=admin

```

- API Version

```
php artisan manthra:api-controller PostsController --crud-name=posts --model-name=Post --route-group=admin

```

Controller's Options:

OptionDescription`--crud-name`The name of the crud. e.g. `--crud-name="post"``--model-name`The name of the model. e.g. `--model-name="Post"``--model-namespace`The namespace of the model. e.g. `--model-namespace="Custom\Namespace\Post"``--controller-namespace`The namespace of the controller. e.g. `--controller-namespace="Http\Controllers\Client"``--view-path`The name of the view path`--fields`Fields name for the form &amp; migration. e.g. `--fields="title#string; content#text; category#select#options=technology,tips,health; user_id#integer#unsigned"``--validations`Validation rules for the form "col\_name#rules\_set" e.g. ``` "title#min:10`--route-group`Prefix of the route group`--pagination`The amount of models per page for index pages`--force`Overwrite already existing controller.For model:

```
php artisan manthra:model Post --fillable="['title', 'body']"

```

For migration:

```
php artisan manthra:migration posts --schema="title#string; body#text"

```

For view:

```
php artisan manthra:view posts --fields="title#string; body#text" --view-path="directory" --route-group=admin

```

By default, the generator will attempt to append the crud route to your `Route` file. If you don't want the route added, you can use this option `--route=no`.

After creating all resources, run migrate command. *If necessary, include the route for your crud as well.*

```
php artisan migrate

```

If you chose not to add the crud route in automatically (see above), you will need to include the route manually.

```
Route::resource('posts', 'PostsController');
```

### Supported Field Types

[](#supported-field-types)

These fields are supported for migration and view's form:

#### Form Field Types:

[](#form-field-types)

- text
- textarea
- password
- email
- number
- date
- datetime
- time
- radio
- select
- file

#### Migration Field Types:

[](#migration-field-types)

- string
- char
- varchar
- date
- datetime
- time
- timestamp
- text
- mediumtext
- longtext
- json
- jsonb
- binary
- integer
- bigint
- mediumint
- tinyint
- smallint
- boolean
- decimal
- double
- float
- enum

### Custom Generator's Stub Template

[](#custom-generators-stub-template)

You can customize the generator's stub files/templates to achieve your need.

1. Make sure you've published package's assets.

    ```
    php artisan vendor:publish --provider="NicoAudy\LaravelManthra\LaravelManthraServiceProvider"

    ```
2. Turn on custom\_template support on **config/laravelmanthra.php**

    ```
    'custom_template' => true,

    ```
3. From the directory **resources/manthra/stubs/** you can modify or customize the stub files.
4. On **config/laravelmanthra.php** you can add new stubs and choose which values are passed

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Credits
-------

[](#credits)

- [NicoAudy](https://github.com/nicoaudy)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 89.7% 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 ~31 days

Total

6

Last Release

2475d ago

Major Versions

1.2 → 2.02019-09-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/9941c23ad97bc5b3f5d7051f784b6feb09c8b0a82668d3f715bab119422ce077?d=identicon)[NicoAudy](/maintainers/NicoAudy)

---

Top Contributors

[![nicoaudy](https://avatars.githubusercontent.com/u/9676457?v=4)](https://github.com/nicoaudy "nicoaudy (70 commits)")[![foobar-commit](https://avatars.githubusercontent.com/u/53514883?v=4)](https://github.com/foobar-commit "foobar-commit (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

crud-generatorgeneratorhacktoberfestlaravellaravel-5-packagelazylaravelcrudcrud generatorlaravel crud generatorLaravelManthra

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nicoaudy-laravelmanthra/health.svg)

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

###  Alternatives

[crestapps/laravel-code-generator

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.

76194.7k1](/packages/crestapps-laravel-code-generator)[takielias/tablar-crud-generator

Laravel Tablar Crud Generator based on https://github.com/takielias/tablar

316.1k](/packages/takielias-tablar-crud-generator)

PHPackages © 2026

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