Laravel Packer was created by, and is maintained by Sarthak, and it is a Command Line Tool which is going to help you in creating package.
- Built on with Laravel-zero.
- Detailed tutorials found on Youtube playlist
- Features
- Installation
- Creating new Package Scaffolding
- Same as Artisan commands
- Smart Clone
- CRUD Generator
- License
Install via composer.
Note: For windows user, first run composer global update
composer global require bitfumes/laravel-packer
packr new your-package-name {vendor} {author} {author_email}
With the above command it will create package scaffolding for you.
Optional fields like 'vendor', 'author' and 'author_email' can also be given via command line interface if you are not willing to provide on command.
With this CLI, you will have access to all artisan commands you are familiar on Laravel.
You can create controller just like you do with php artisan
packr make:controller controller_name
Explore all commands, just run packr
on your command line.
Now you can create Migrations and Factories also
With packr clone
command you can do 3 steps in just one.
packr clone {repositoryname}
This not only clone repository but also install composer and if that repository type is project, then it will generate key for project also.
Just like git, you can clone repository to any directory, just give --dir=
option for above command
packr clone {repositoryname} --dir={custom_directory_name}
Just like git, you can clone any branch of given repository.
packr clone {repositoryname} --branch={branch_name}
Above command will create various files like
- Model with relationships
- Controller with all crud functions
- Routes based on web or api file
- factory
- migration
- unit test (if relationship is described in json)
- Feature test for all crud part
This not only clone repository but also install composer and if that repository type is project, then it will generate key for project also.
With packr crud
command you can create crud for laravel appication with fully green tests
First we need to create a json structure for our migration of any model/table To do so run this command
packr crud:json {exactModelName}
Now you have json file, you can describe how your migration/schema is going to look. After giving all details you can now run command to actually create full crud for the model
packr crud:make {relativePathOfThatJsonFile}
- Add resource in controller for CRUD maker
- Add form request in controller for CRUD maker
This package inherits the licensing of its parent framework, Laravel, and as such is open-sourced software licensed under the MIT license