johnclendvoy / makeall
A Laravel command to easily create all of the needed files for a new model.
Requires
Requires (Dev)
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~6.0
This package is not auto-updated.
Last update: 2024-05-13 21:29:07 UTC
README
This package makes it easy to generate all the files needed for a new object in a laravel project. With one command, it will generate, a Model, Controller, Request, Migration and a folder of views all based on templates that you design that work with your workflow.
Installation
Via Composer
$ composer require johnclendvoy/makeall
Usage
$ php artisan make:all ObjectName
Where ObjectName
is the singular name of your object. For example, Event
, BlogPostComment
, or PhotoGallery
or whatever you need for your project.
This single command is the equivalent to running the following commands:
$ php artisan make:model ObjectName
$ php artisan make:controller ObjectNameController
$ php artisan make:request ObjectNameFormRequest
$ php artisan make:migration create_object_names_table --create=object_names
$ mkdir ./resources/views/object-name
$ cd resources/views/object-name
$ touch index.blade.php
$ touch show.blade.php
$ touch create.blade.php
The singularity or case of the argument ObjectName
isn't really important. The following commands are supported and equivalent.
$ php artisan make:all ObjectName $ php artisan make:all ObjectNames $ php artisan make:all object-name $ php artisan make:all object-names $ php artisan make:all object_name $ php artisan make:all Object_Names $ php artisan make:all "object name" $ php artisan make:all "Object Names"
Issues
If you discover any issues, or would like to improve this package, please do not hesitate to email john.c.lendvoy@gmail.com or submit an issue on github.
Credits
License
MIT license. Please see the license file for more information.