se468/laravel-package-generators-extended
Composer 安装命令:
composer require se468/laravel-package-generators-extended
包简介
Create migrations, models, controllers for custom packages using artisan commands.
README 文档
README
Adds Artisan command generators for the package for Commands, Migrations, Controllers, Models for rapid package development.
This package comes with useful generators:
php artisan package:create php artisan package:command php artisan package:controller php artisan package:migration php artisan package:model
Install
Via Composer
$ composer require se468/laravel-package-generators-extended
Optional Configuration
If you do not want to type vendor/package/namespace over and over for your generators, we offer a config file method.
Publish the config file.
$ php artisan vendor:publish
It will generate package-generators.php in the app/config directory. You can modify vendor, package, namespace to set the default package. You may now call the commands without specifying vendor/package/namespaces, and just specify the name of the file you want to create.
Usage
Package
$ package:create {vendor} {package} {namespace}
Will create a service provider and composer.json in your package src directory.
It will also add the psr4 namespaces in your laravel's composer.json file and register the service provider in config/app.php automatically.
It's that simple!
Command
$ package:command {name_of_file} {vendor?} {package?} {namespace?} --path
Example:
$ php artisan package:command TestCommand se468 test-package TestNamespace
or using config file
$ php artisan package:command TestCommand
Controller
$ package:controller {name_of_file} {vendor?} {package?} {namespace?} --path
Example:
$ php artisan package:controller TestController se468 test-package TestNamespace
or using config file
$ php artisan package:controller TestController
Migration
$ package:migration {name_of_file} {vendor?} {package?} {namespace?} --path
Example:
$ php artisan package:migration create_test_migration se468 test-package TestNamespace
or using config file
$ php artisan package:migration create_test_migration
Model
$ package:model {vendor} {package} {namespace} {name} --path
Example:
$ php artisan package:model TestModel se468 test-package TestNamespace
or using config file
$ php artisan package:model TestModel
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 922
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-26