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
0
1.8k
Relearning Eloquent
https://laravel-meetup-tokyo.connpass.com/event/77823/
zuckey_17
March 08, 2018
Tweet
Share
More Decks by zuckey_17
See All by zuckey_17
お手並み拝見にしないオンボーディング
zuckey_17
2
2.3k
事業の試行錯誤を支える コードを捨てやすくして システムをシンプルに保つ設計と工夫
zuckey_17
10
5.2k
事業の試行錯誤を支えるピボットしやすいシステム設計と工夫 / Easy-to-pivot system design to support trial and error in business
zuckey_17
4
960
新規事業のOKRに寄り添う開発の意思決定 / Development decisions to lean on business OKRs
zuckey_17
2
590
Redash made inter-team communication active -
zuckey_17
2
5.1k
しがないラジオの作り方
zuckey_17
0
2.9k
今更聞けないReact
zuckey_17
4
2k
Other Decks in Programming
See All in Programming
AIコーディングAgentとの向き合い方
eycjur
0
270
TDD 実践ミニトーク
contour_gara
1
290
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.2k
Rancher と Terraform
fufuhu
2
240
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
230
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
480
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
310
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
10
3.8k
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
670
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
20
11k
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
How to Ace a Technical Interview
jacobian
279
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Being A Developer After 40
akosma
90
590k
Code Reviewing Like a Champion
maltzj
525
40k
Faster Mobile Websites
deanohume
309
31k
Side Projects
sachag
455
43k
Navigating Team Friction
lara
189
15k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
The Cult of Friendly URLs
andyhume
79
6.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
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