Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Laravel DI・Facadeの使い方
Search
ls_pr
November 26, 2019
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravel DI・Facadeの使い方
(株)ロジカルスタジオ勉強会「ゆるっとLaravel『明日から使えるLaravelの話』」における発表資料
ls_pr
November 26, 2019
More Decks by ls_pr
See All by ls_pr
戦場で生き抜く 炎上案件の耐え方
ls_pr
0
260
自作PCのすすめ
ls_pr
0
190
ツボを押さえたWFの作り方
ls_pr
0
190
Linuxのちょこっと調べ
ls_pr
0
170
色々な色の話~今日から使える簡単配色テクニック3つ~
ls_pr
0
300
ゼロから始めるフロントエンドモジュール開発についてあれこれ
ls_pr
0
170
ejsのすすめ
ls_pr
0
220
JSにおける正規表現
ls_pr
0
190
Vue.jsの機能を使って色々作ってみた
ls_pr
0
500
Other Decks in Programming
See All in Programming
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
100
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
320
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
310
Performance Optimization With LLMs
xleitix
0
250
Crash Auto Pipelines
veronikapj
1
400
オーケストレーション記述言語 Katari
yukikurage
0
240
GraphQL の onError と Nullability のこれから
quramy
0
210
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to Ace a Technical Interview
jacobian
280
24k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Prompt Engineering for Job Search
mfonobong
0
580
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Bash Introduction
62gerente
615
220k
Docker and Python
trallard
47
4.3k
sira's awesome portfolio website redesign presentation
elsirapls
0
500
Transcript
www.***.com Laravel DI・Facadeの使い方
自己紹介 ・本谷 雄佑(ほんたに ゆうすけ) ・株式会社ロジカルスタジオで 主にWeb系案件のPLをやっています。
Laravelを勉強しはじめると、DIやFacadeが 頻繁に出てきます。
これらを使用せずとも問題無いのでは? と考えたこともありました。 DIやFacadeを使う理由を聞かれることもあるので、それぞ れのメリットなどを検証しました。
下記4パターンで、それぞれの差異を検証 ・newでインスタンスを取得する ・静的メソッドを使用する ・DIを使用する ・Facadeを使用する
実際のコードを見ていきます。
使用するソースコード src/app/Utilities/Env.php src/app/StaticUtilities/Env.php src/app/Facades/Env.php src/app/Providers/AppServiceProvider.php src/routes/web.php src/app/Http/Controllers/HomeController.php src/tests/Feature/HomeControllerTest.php
ご清聴ありがとうございました。