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で自家製ライブラリを作ってみよう!
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
syossan27
June 20, 2022
Programming
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravelで自家製ライブラリを作ってみよう!
syossan27
June 20, 2022
More Decks by syossan27
See All by syossan27
一人でちいさくはじめる Platform Engineering
syossan27
4
3k
一人SREが歩んだPlatform Engineeringスモールスタート実践録 ~ クラウドネイティブ会議版 ~
syossan27
4
2.3k
プロポーザル サポートガイドを読み解いていこう!
syossan27
3
1k
幻滅期を越える サイトリライアビリティ エンジニアリング
syossan27
1
270
一人SREが歩んだ Platform Engineering スモールスタート実践録
syossan27
2
2k
SREって何? 現場で学んだサイト信頼性の第一歩
syossan27
5
1.7k
知識0からカンファレンスやってみたらこうなった!
syossan27
5
790
突然のメモリ使用率上昇へ対応! k8sカスタムコントローラー開発事例
syossan27
2
590
監視 やばい
syossan27
12
11k
Other Decks in Programming
See All in Programming
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
170
AIエージェント時代のコードレビューを設計する
nogu66
6
2.6k
Building an Out-of-Order CPU
latte72
1
750
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
250
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
240
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
300
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
6
1.6k
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
400
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
Producing Creativity
orderedlist
PRO
348
41k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
280
Fireside Chat
paigeccino
43
4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
BBQ
matthewcrist
89
10k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Why Our Code Smells
bkeepers
PRO
340
58k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
Building an army of robots
kneath
306
46k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Transcript
Laravelで 自家製ライブラリを 作ってみよう!
自己紹介 名前:井上翔太(しょっさん:syossan27) 所属:株式会社コンテンツワン スキル:PHPer歴2年ちょいのひよっこPHPer 性格:適当・ずぼら
LTやる前に一つ
物凄く慌てて資料作りました
None
間違いがあれば ご指摘オナシャス!
今回は
ライブラリ作っていきます
None
まずはライブラリ入れとく ディレクトリ作り
None
mkdir libraries
プロジェクトのappの下に作ると 良いかも
次に
作ったディレクトリを 設定ファイルに記述します
None
app/start/global.php ClassLoader::addDirectories(array( app_path().'/commands', app_path().'/controllers', app_path().'/models', app_path().'/database/seeds', app_path().'/libraries' ←追加! ));
composer.json "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/database/seeds",
"app/tests/TestCase.php", "app/libraries" ←追加! ] }
設定後は composer dump-autoload を忘れずに!
そろそろライブラリファイルを 作成していきます
None
今回は libraries/helper.php として作成します
helper.php <?php class Helper { public static function test(){ print_r(“テストだよ!”);
} }
タレ完成!
それじゃタレ使って 料理してみましょう!
None
間違えました(・ω<)
MainController index(){ Helper::test(); }
indexにアクセスしてみると・・・
None
動いた!
皆さんも是非自家製ライブラリ 作ってみてください!
None