alphazento/alphazento-package-assistant

alphazento framework package develement assistant

1.0 2020-09-10 23:36 UTC

This package is auto-updated.

Last update: 2024-04-11 08:24:42 UTC


README

1. Introduction

The Alphazento Package Assistant extends Laravel make command group to help you to implement Alphazento.

  • Create package with a single command.
  • Make console, model, provider, mail... classes for your package.

2. Requirements

  • Laravel: v7.0.0 or higher.
  • PHP: v7.2.0 or higher.

3. Installation

Install with composer

Go to the root folder of Alphazento and run the following command

composer require alphazento/alphazento-package-assistant

After install the package, just run the following command

php artisan package:enable Zento_PackageAssistant
  • If your project is base on Laravel not Alphazento, since the Zento*PackageAssistant package will install it's dependency package *alphazento\zento_, so you need to run the command to enable Zento_Kernel first.
php artisan package:enable Zento_Kernel
php artisan package:enable Zento_PackageAssistant

4. Support Command List

1. make:package

It's a new added command.

For e.g., If you want to create a package under your vendor's name 'YourCompany', and the package name is "TestPackage", so the full name of your package will be "YourCompany_TestPackage",(Pleae note that you the "_" is for seperate Vendor name and package name, so please do not use "_" in your vendor and package name) then you need to use the command like this,

php artisan make:package YourCompany_TestPackage

2. other make command extends from Laravel

Here're some commands extends from Laravel by adding package name parametter

  • make:model
  • make:controller
  • make:middleware
  • make:request
  • make:job
  • make:provider
  • make:mail
  • make:event
  • make:listener
  • make:console
  • make:migration
  • make:exception

All these command will take first parameter as package name For e.g., If you want to create model in your pacage YourCompany_TestPackage, just run the following command:

php artisan make:model YourCompany_TestPackage TestModel

Then you will find there's file TestModel.php inside the folder YourCompany\TestPackage\Model

As a comparation, the original command in Laravel which is:

php artisan make:model TestModel
  • All these commands detail you can check on Laravel docs