File tree Expand file tree Collapse file tree 6 files changed +45
-8028
lines changed
Expand file tree Collapse file tree 6 files changed +45
-8028
lines changed Original file line number Diff line number Diff line change 1+ root = true
2+
3+ [* ]
4+ charset = utf-8
5+ end_of_line = lf
6+ insert_final_newline = true
7+ indent_style = space
8+ indent_size = 4
9+ trim_trailing_whitespace = true
10+
11+ [* .md ]
12+ trim_trailing_whitespace = false
13+
14+ [* .{yml,yaml} ]
15+ indent_size = 2
Original file line number Diff line number Diff line change 11/vendor
2+ /coverage
23.env
34.php_cs.cache
45.phpunit.result.cache
6+ composer.lock
Original file line number Diff line number Diff line change 1- # A Laravel package example
1+ # A2Workspace/Laravel-Stubs
2+
3+ 一個基於專案的程式模板注入器。
4+
5+ 透過在專案中的 ` resources/stubs ` 目錄下,放置類別的模板文件,然後透過命令快速注入並生成。相比原生的 ` artisan make:* ` 命令可大大減少編寫時間,且模板檔案可隨版控被 git 紀錄。
6+
7+ 目前支援的類別類型:
8+ - 命名空間 App\\ * 開頭的類別
9+ - 命名空間 Tests\\ * 開頭的類別
10+ - 命名空間 Database\\ * 開頭的類別
11+
12+ ## Installation | 安裝
13+
14+ 此套件尚未發布到 ** Packagist** 需透過下列方法安裝:
15+
16+ ```
17+ composer config repositories.a2workspace/laravel-stubs vcs https://github.com/A2Workspace/laravel-stubs.git
18+ composer require "a2workspace/laravel-stubs:*"
19+ ```
20+
21+ ## Usage | 如何使用
22+
23+ 現在你可以使用 ` make:a.. ` [ Artisan 命令] ( https://laravel.com/docs/9.x/artisan ) 來生成類別。該命令將會讀取 ` resources/stubs ` 下的目錄或 ` .php ` 檔案,將佔位符依照格式替換為給定的名稱,並依照類別名稱自動生成檔案到相對的路徑。
24+
25+ ```
26+ php artisan make:a..
27+ ```
Original file line number Diff line number Diff line change 11{
22 "name" : " a2workspace/laravel-stubs" ,
3- "description" : " A Laravel package example. " ,
3+ "description" : " 一個基於專案的類別模板注入器。 " ,
44 "license" : " MIT" ,
55 "authors" : [
66 {
You can’t perform that action at this time.
0 commit comments