This package aims to generate packages to increase productivity. It offers a flexible package structure thanks to settings that can be found in the structures array on config/packagify.php. The detailed explanations can be found in that array's comment block.
It should be production-ready but hasn't been tested enough. You should use it carefully since this package will manipulate your files and folders. Always use a version-control, and make sure you have File History to be able to roll back the changes.
- Go to
vendor/bakgul/kernel/config/apps.php
file and see the changes. We have a new key namedroutes
under each app. Bring that new structure to your packagify.php file in your config folder. - Add
'bundler' => 'vite' or 'mix'
to the main array under 'Main from Kernel' section in your packagify.php file in your config folder.
If you installed Packagified Laravel, you should have this package already. So skip installation.
composer require bakgul/laravel-package-generator
Next, you need to publish the settings by executing the following command. By doing so, you will have a new file named packagify.php on the config folder. If you check the "files" array, you can see the file types that can be created. Quite deep explanations are provided in the comment block of the files array.
sail artisan packagify:publish-config
create:package {package} {root} {--d|dev}
-
package: It's required and must be unique.
-
root: It's required and must be one of the predefined roots in the "roots" array on config/packagify.php. The roots' keys or folders can be used here.
- dev: If you create a dev-dependency, add "-d" or "--dev" to the command.
I copied the service provider's boilerplate from the package generated on BeyondCode Boilerplate Generator
The main package that includes this one can be found here: Packagified Laravel