laravel-generator is administrative interface builder for laravel which can help you build code template you want as soon as possiable.
- PHP >= 7.0.0
- Laravel >= 5
composer require --dev foryoufeng/laravel-generator
If you do not run Laravel 5.5 (or higher), then add the service provider in
Then run the command to install the generator
php artisan generator:install
After run command you can find config file in
config/generator.php,and now you can access your application
http://yourhost/generator to use the
After the installation is complete, the project generates templates such as model, controllers and views by default. Other templates can be added or modified according to the actual needs of the project.
<?php return [ 'name' => 'Laravel-generator', //the url to access 'route'=>'generator',//you can change the access url if you do not like it //the rule can be used by the field , You can define the format of the fields you need. 'rules'=>[ 'string', 'email', 'file', 'numeric', 'array', 'alpha', 'alpha_dash', 'alpha_num', 'date', 'boolean', 'distinct', 'phone', ], ];
You can define the format of the stub you need followed by my rules,such as
Only Chinese and English are supported by laravel generator now
Please see the changelog for more information on what has changed recently.
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email email@example.com instead of using the issue tracker.
MIT. Please see the license file for more information.