Download the PHP package trd-rdm/make-unit-command without Composer

On this page you can find all versions of the php package trd-rdm/make-unit-command. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package make-unit-command

Unit Make Command

用法

Introduction

A laravel unit make command which may help project team member quickly create the necessary files for a resource route.

1. 安裝步驟

(1) 安裝

打開命令提示視窗,在專案根目錄路徑底下輸入 composer require trd-rdm/make-unit-command --dev 確認安裝成功後

(2) 註冊 Service Provider

在專案根目錄下找到 app/Providers/AppServiceProvider.php 中找到 register() 函式 在函式中 宣告只有在本地端 (當APP_ENV = local) 才註冊 UnitCommandServiceProvider,添加內容如下斜線粗體部分:

說明: 只在本地端註冊避免在 google cloud platform 上建置機器時,可能會無法連線到此 私人GitLab函式庫而導致建立過程出錯,同時建置機器時建議以"composer install --no-dev" 安裝,跳過安裝 require-dev 中的開發階段的套件,避免建置失敗。

(3) 複製套件文檔至專案中

打開命令提示視窗,在專案根目錄路徑底下輸入 php artisan vendor:publish --tag=generator --force,將必要檔案複製到專案中,若是沒有顯示錯誤,表示安裝完成。 不要忘了將這些檔案 git add,push 上 server 讓專案成員可以使用。


2. 使用說明:

(1) 指令

用法類似於 Laravel 內建的 make:controller的指令。
打開命令提示視窗,在專案根目錄路徑底下輸入,在專案根目錄底下輸入 php artisan make:unit Folder/User ,表示在 Folder 資料夾底下建立相關文件。

上述指令會
(1) 在 app/Http/Folder/Controller/User底下建立 Controller.php, Transform.php, Form.php
(2) 在App/Management/Folder/User 底下建立 Service.php, SearchService.php, Repository.php, Entity.php
(3) 在 api.php 底下新增預設的 resource routes 如下:

(2) 啟用/停用建立檔案

若是不想自動在 api.php 底下新增 resource routes,可以到config/generator.php 底下找到'route' 將 enable 改為 false。 同理,你也可以disable controller, entity 或是 search 檔案的建立。

3. 更新步驟:

指令

  1. composer update rdm/make-unit-command
  2. 在專案根目錄路徑底下輸入 php artisan vendor:publish --tag=generator --force 覆蓋舊檔案
  3. 將所有變更 git push

v1.1.0

2019-10-14
Added

Changed

v1.1.1

2019-12-30
Added

Changed

v1.1.2

2020-04-09
Changed

v1.1.5

2022-01-10
Changed


Form 範例程式

Form.php

格式自由填寫


All versions of make-unit-command with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package trd-rdm/make-unit-command contains the following files

Loading the files please wait ....