Install via composer
composer require --dev wovosoft/crud
Publish package config if you want customize default values
php artisan vendor:publish --provider="Wovosoft\Crud\ServiceProvider" --tag="config"
php artisan crud:make_package {vendor} {package}
or, with inraction
php artisan crud:make_package -i
Example: php artisan crud:make_package Wovosoft SomeAwesomePackage
This command will:
- Create
packages/wovosoft/some-awesome-package
folder - Register package in app composer.json
- Copy package skeleton from skeleton folder to created folder (you can provide
your custom skeleton path in config) - Run
git init packages/wovosoft/some-awesome-package
- Run
composer update wovosoft/some-awesome-package
- Run
composer dump-autoload
With interactive -i
flag you will be prompted for every needed value from you.
php artisan crud:remove_package {vendor} {package}
Example: php artisan crud:remove_package Wovosoft SomeAwesomePackage
This command will:
- Run
composer remove wovosoft/some-awesome-package
- Remove
packages/wovosoft/some-awesome-package
folder - Unregister package in app composer.json
- Run
composer dump-autoload
Interactive mode also possible.
php artisan crud:make_controller {vendor} {package} {controller} {model}
\
php artisan crud:make_controller -i
php artisan crud:remove_controller {vendor} {package} {controller}
php artisan crud:remove_controller -i
php artisan crud:make_model {vendor} {package} {model}
php artisan crud:make_model -i
php artisan crud:remove_model {vendor} {package} {model}
php artisan crud:remove_model -i
There is a Console Application available. To run all above Artisan Commands from a single terminal with less commands, please run
php artisan crud -i
orphp artisan crud
. Then you can see the all available commands in a multiple choice form. Just select an option and that command will start executing immediately in interaction mode. You can then follow the rest of the ongoing processes.
This package will copy all folders and files from specified skeleton path to package folder. You can use templates in your skeleton. All files with
tpl
extension will be provided with some variables available to use in them.tpl
extension will be stripped.
- vendor (e.g. Wovosoft)
- package (e.g. SomeAwesomePackage)
- vendorFolderName (e.g. wovosoft)
- packageFolderName (e.g. some-awesome-package)
- packageHumanName (e.g. Some awesome package)
- composerName (e.g. wovosoft/some-awesome-package)
- composerDesc (e.g. A some awesome package)
- composerKeywords (e.g. some,awesome,package)
- licence (e.g. MIT)
- phpVersion (e.g. >=7.0)
- aliasName (e.g. some-awesome-package)
- configFileName (e.g. some-awesome-package)
- year (e.g. 2017)
- name (e.g. Narayan Adhikary)
- email (e.g. narayanadhikary24@gmail.com)
- githubPackageUrl (e.g. https://github.com/wovosoft/some-awesome-package)
- controller (Name of the Controller for Controller Generation)
- model (Name of the Model for Model Generation)
- Service provider and alias registration (if you use laravel <5.5)
- In README.md:
- StyleCI repository identifier
- Package description
- Usage section
If you discover any security related issues, please email narayanadhikary24@gmail.com Or, create an issue in this github repository.
- Special Thanks to https://github.com/melihovv/laravel-package-generator . We have just made an extended version of this package. A Console Application is integrated to perform all operations. Few more commands like Controller, Models with adding and removing features for certain packages are added.