Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Relearning Eloquent
Search
zuckey_17
March 08, 2018
Programming
2k
0
Share
Relearning Eloquent
https://laravel-meetup-tokyo.connpass.com/event/77823/
zuckey_17
March 08, 2018
More Decks by zuckey_17
See All by zuckey_17
お手並み拝見にしないオンボーディング
zuckey_17
3
2.6k
事業の試行錯誤を支える コードを捨てやすくして システムをシンプルに保つ設計と工夫
zuckey_17
10
5.6k
事業の試行錯誤を支えるピボットしやすいシステム設計と工夫 / Easy-to-pivot system design to support trial and error in business
zuckey_17
4
990
新規事業のOKRに寄り添う開発の意思決定 / Development decisions to lean on business OKRs
zuckey_17
2
650
Redash made inter-team communication active -
zuckey_17
2
5.3k
しがないラジオの作り方
zuckey_17
0
3.1k
今更聞けないReact
zuckey_17
4
2.1k
Other Decks in Programming
See All in Programming
AI-DLC Deep Dive
yuukiyo
9
5.7k
AI時代になぜ書くのか
mutsumix
0
340
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
Firefoxにコントリビューションして得られた学び
ken7253
2
160
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
19k
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
22
12k
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
JCON - Create Agentic AI Apps, The Easy Way!
kdubois
1
100
空間オーディオの活用
objectiveaudio
0
150
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
110
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
400
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
360
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
Building Applications with DynamoDB
mza
96
7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
800
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
KATA
mclloyd
PRO
35
15k
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
Ethics towards AI in product and experience design
skipperchong
2
270
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Transcript
Eloquentͷ͍ํΛߟ͑ͨ͠ 2018/03/08@Laravel Meetup Tokyo Vol.10
Introduction •zuckey •developer •ϑϩϯτΤϯυ, αʔόαΠυ •React, PHP, Laravel •twitter: @zuckey_17
•Podcastʮ͕͠ͳ͍ϥδΦʯύʔιφϦςΟʔ •https://shiganai.org
•EloquentΛ͏ཧ༝Λ͖ҧ͍͑ͯͨ •ጻչ •͓ͦΒ͘͜ͷͷଟ͘ͷਓʹͱͬͯͨΓલ
Eloquent ͱͷؔΘΓ •SQLite => MySQLͷҠߦ •ૉͷSQLΛهड़ •ORMΛͬͯDBΛԾతʹଊ͍͑ͨ ORM = ͱΓ͋͑ͣSQLΛΘͳ͍ͷ͘Β͍ʹࢥ͍ͬͯͨ
None
;ͱɺϒϩάͰॻ͍ͨίʔυ
;ͱɺϒϩάͰॻ͍ͨίʔυ $table ͍Βͳ͍ $fillable ͍Βͳ͍ ؾܰʹtoArray͠ͳ͍ େྔͷࢦఠ ʘ(^o^)ʗ
id key title description url published_at episodes id episode_id text
url episode_contents id episode_id cast_id episode_casts name twitter_screen_name image_url type casts 1 ର ଟ ଟ ର ଟ ྫ͑͜͏͍͏ςʔϒϧͰ
JSON͕΄͍͠
with ඍົͳࣝ ΫΤϦͷճര૿
ORM https://qiita.com/yk-nakamura/items/acd071f16cda844579b9
ศརͳ API Λ͏ •EagerϩʔυͰΫΤϦճΛগͳ͘ •σʔλྔ͕૿͑ΔͱtoArrayഅࣛʹͳΒͳ͍ •࿈ྻͷkeyΛมߋ͚ͨ͠Εશ෦Ҿ͍͔ͯΒ
·ͱΊ •DBͷΞΫηεΛORMܦ༝ʹ ஔ͖͑Δ͚ͩͰ͋·Γ͏·Έ͕ͳ͍ •ೖΕΔͷίετͳͷͰɺ ͍͞ͳ͍ͱٯʹෛ࠴ʹͳͬͯ͠·͏
એ •https://shiganai.org