承接 anandmainali/packagetemplate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anandmainali/packagetemplate

Composer 安装命令:

composer require anandmainali/packagetemplate

包简介

Make your package development easier with package template.

README 文档

README

Latest Version forks stars license Total Downloads

Package template helps to create a structure of package with single command. It also provides other commands to generate files just as in laravel.

Installation

Use the package manager composer to install PackageTemplate.

composer require anandmainali/packagetemplate

Enable the package (Optional)

This package implements Laravel auto-discovery feature. After you install it, the package provider and facade are added automatically for laravel >= 5.5.

Configuration

After installation, you have to publish config file.

php artisan vendor:publish --tag=package-config

This will generate package.php file inside the config folder.

Package.php

<?php

return [
  /**
   * Main folder to holds all the packages. Contains packages with VendorName. 
   */
  'path' => 'packages',
  
  /**
   * The VendorName will be generated inside the main folder.
   */
  'vendorName' => "VendorName",
  
  /**
   * These are the folders that will be generated while creating package.
   */
  'folders' => [
    'controllers', 'database/migrations', 'models', 'policies', 'resources/views', 'routes'
  ],
  
  /**
   * These are the files that will be generated while creating package.
   */
  'files' => ['routes/web']

];

Now, you can start building your package. To generate package,

php artisan create:package PackageName

And, all the files and folders you specified in config.php will be generated.

Other Available Commands with php artisan

Note:- The PackageName is used to generate files inside the package.

create:model ModelName PackageName
create:controller ControllerName PackageName --r //--r is optional. It is used to create resource controller.
create:migration MigrationName TableName PackageName
create:policy PolicyName PackageName
create:command CommandName --command=command:name PackageName

统计信息

  • 总下载量: 2.78k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-10