leicaflorian / pimp_my_crud
Artisan commands for creating CRUD views and controller.
1.0.5
2023-03-21 14:00 UTC
Requires
- php: ^8.0.2
- doctrine/dbal: ^3.6
- guzzlehttp/guzzle: ^7.2
Requires (Dev)
- fakerphp/faker: ^1.9.1
- phpunit/phpunit: ^9.5.10
- spatie/laravel-ignition: ^1.0
README
Laravel artisan command for easily generating CRUD views and controller with all necessary code.
Installation
Install package via composer
composer require --dev "leicaflorian/pimp_my_crud"
Usage
Before using the command, you have to generate the necessary models and migrate the database because the command will use the database schema to generate the views and controller.
Views
php artisan pmc:views [options] [--] <resource>
Arguments
resource
: Name of the resource, in lowercase, plural, e.g. "posts. This can be nested in a subfolder, e.g. "admin/posts"
Options
--only
: Only create the specified views, separated by comma. Available values are "index", "edit", "create" and " show"--wysiwyg
: Add a wysiwyg editor to the edit and create views--force
: Overwrite existing views--model
: Manually specify the model name. [Default: resource name in PascalCase, singular]
php artisan pmc:views posts php artisan pmc:views posts --only=index,edit php artisan pmc:views posts --only=index,edit --force php artisan pmc:views posts --wysiwyg --force php artisan pmc:views language-lines --model=Language
Controller
php artisan pmc:controller [options] [--] <resource>
Arguments
resource
: Name of the resource, in lowercase, plural, e.g. "posts. This can be nested in a subfolder, e.g. "admin/posts"
Options
--force
: Overwrite existing controller--model
: Manually specify the model name. [Default: resource name in PascalCase, singular]--controller
: Manually specify the controller name. [Default: resource name in PascalCase, singular, ending with "Controller"]
php artisan pmc:controller posts php artisan pmc:controller posts --force php artisan pmc:controller language-lines --model=Language php artisan pmc:controller language-lines --controller=Language