Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Laravel_向けの_Package_の作り方.pdf
Search
jhonyspicy
November 12, 2019
Programming
0
160
Laravel_向けの_Package_の作り方.pdf
jhonyspicy
November 12, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
210
Patterns of Patterns
denyspoltorak
0
350
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
140
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.8k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
590
愛される翻訳の秘訣
kishikawakatsumi
3
350
Basic Architectures
denyspoltorak
0
120
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
170
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.4k
RailsConf 2023
tenderlove
30
1.3k
Claude Code のすすめ
schroneko
67
210k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
Into the Great Unknown - MozCon
thekraken
40
2.2k
Test your architecture with Archunit
thirion
1
2.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.1k
A designer walks into a library…
pauljervisheath
210
24k
Statistics for Hackers
jakevdp
799
230k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
270
New Earth Scene 8
popppiees
0
1.2k
Transcript
Laravel 向けの Packageの作り方 初LTです((((;゚Д゚))))ガクガクブルブル
自己紹介 • 高良 和真 • 琉球インタラクティブ株式会社 • Laravel + Lighthouse(GraphQL)
• @jhonyspicy • ビリヤード・DIY・ステンレス削り
今回のサンプルはこちら https://github.com/jhonyspicy/laravel-example-package
1. GitHubにリポジトリを追加 2. orchestral/testbench パッケージを追加 3. テストを書きつつ開発 4. Packagistで公開 大まかな流れ
1. git clone 2. composer init 3. composer require --dev
orchestra/testbench 4. 下記を作成 • /src • /tests/Feature • /tests/Unit • /phpunit.xml
composer.json に autoload の設定を追記 "autoload": { "psr-4": { "jhonyspicy\\LaravelExamplePackage\\": "src/"
} }, "autoload-dev": { "psr-4": { "jhonyspicy\\LaravelExamplePackage\\Tests\\": "tests" } }
この時点で簡単なテストが動きます。 class ExampleTest extends TestCase { /** * A basic
test example. * * @return void */ public function testBasicTest() { $this->assertTrue(true); } }
DBを使いたい時 • SQLiteのインメモリDBが使えます。 • migrationを使えます。 • factoryも使えます。
None
Versionの上げ方 Tagをつけてプッシュ 例 • 1.0.0 • v1.0.0 • 1.10.5-RC1 •
v4.4.4beta2 • v2.0.0-alpha • v2.0.4-p1
Providerを自動で読み込む composer.jsonに追記 "extra": { "laravel": { "providers": [ "jhonyspicy\\LaravelExamplePackage\\Provider" ]
} }
不要なファイル除外する .gitattributes 追加 /tests export-ignore .gitattributes export-ignore .gitignore export-ignore phpunit.xml
export-ignore
ご静聴ありがとうございました。