https://github.com/trannguyenhan/autogencontroller
Library support autogen controller in Laravel
https://github.com/trannguyenhan/autogencontroller
auto-generator php php-package
Last synced: 3 days ago
JSON representation
Library support autogen controller in Laravel
- Host: GitHub
- URL: https://github.com/trannguyenhan/autogencontroller
- Owner: trannguyenhan
- License: mit
- Created: 2022-04-16T16:25:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T03:05:42.000Z (almost 4 years ago)
- Last Synced: 2025-12-14T20:54:54.071Z (6 months ago)
- Topics: auto-generator, php, php-package
- Language: PHP
- Homepage: https://packagist.org/packages/trannguyenhan/autogencontroller
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto gen controller Laravel

For each person and each project will bring a different code structure, each person likes and has their own style, this project does not help you to create really good controllers, but it can be a foundation. so you can create your own better versions by making changes in the templates folder
## Configuration
Install via composer ([packagist](https://packagist.org/packages/trannguyenhan/autogencontroller)):
```bash
composer require trannguyenhan/autogencontroller
```
## Usage
Gen controller and repository with command:
```bash
php artisan tnhgen:controller
```
If your controller extends orther Class without Controller or your repository extends other Class without BaseRepository add parameter when gen controller:
```bash
php artisan tnhgen:controller --basecontroller YourController --baserepository YourRepository
```
If you want assign model corresponding with controller use under parameter:
```bash
php artisan tnhgen:controller --model YourModel
```
If controller within a namespace, add parameter:
```bash
php artisan tnhgen:controller --namespace YourNamespace
```
and of course, you can combine all the above parameters at once. If you want gen model from MySQL database, PostgreSQL and SQLite, you can follow repository [https://github.com/reliese/laravel](https://github.com/reliese/laravel)