Skip to content

bulentAkgul/laravel-package-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Package Generator

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.

DISCLAIMER

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.

v3 Update guide

  • Go to vendor/bakgul/kernel/config/apps.php file and see the changes. We have a new key named routes 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.

Installation

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

Signature

create:package {package} {root} {--d|dev}

Arguments

  • 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.

Options

  • dev: If you create a dev-dependency, add "-d" or "--dev" to the command.

Credit

I copied the service provider's boilerplate from the package generated on BeyondCode Boilerplate Generator

Packagified Laravel

The main package that includes this one can be found here: Packagified Laravel

The Packages That Will Be Installed By This Package