Download the PHP package a2workspace/laravel-stubs without Composer

On this page you can find all versions of the php package a2workspace/laravel-stubs. 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 laravel-stubs

Laravel-Stubs

一個基於專案的程式模板注入器。

透過在專案中的 resources/stubs 目錄下,放置類別的模板文件,然後透過命令快速注入並生成。相比原生的 artisan make:* 命令可大大減少編寫時間,且模板檔案可隨版控被 git 紀錄。

目前支援的類別類型:

Installation | 安裝

執行下列命令透過 composer 引入到你的 Laravel 專案:

接著使用 vendor:publish 命令生成配置文件與 resources/stubs 資料夾:

預設的 resources/stubs 資料夾內附帶一個簡單的範例。

Usage | 如何使用

現在你可以使用 make:a... Artisan 命令來生成類別。該命令將會讀取 resources/stubs 下的目錄或 .php 檔案,將佔位符依照格式替換為給定的名稱,並依照類別名稱自動生成檔案到相對的路徑。

可以傳入一個搜尋參數:

Development | 如何編寫自己的類別模板

類別模板 預設被存放在 resources/stubs 目錄下,支援單一 .php 檔案或一整個目錄包。檔案名稱並不會影響注入過程,laravel-stubs 將會以最終處理完的 namespace 作為依據,將生成的檔案放置到專案的相對路徑。

你可以建立一個 類別模板 並透過 Dummy 佔位符填充類別名稱。

一個簡單的 Model 模板如下:

在生成時 laravel-stubs 將會依照以下規則替換:

處理的原始碼可參考 StubGeneratorCommand::replaceClass()

詳細則可參考 resources/stubs 下預設的模板。


All versions of laravel-stubs with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
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 a2workspace/laravel-stubs contains the following files

Loading the files please wait ....