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
"Laravel/ui" 使い始め #larasap
Search
Kihara, Takuya
October 31, 2019
Technology
2
500
"Laravel/ui" 使い始め #larasap
Laravel x Vue.js 勉強会 in ゆめみ札幌 vol.2 LT資料
https://larasap.connpass.com/event/148886/
Kihara, Takuya
October 31, 2019
Tweet
Share
More Decks by Kihara, Takuya
See All by Kihara, Takuya
ライブコーディングで知るAmplify Gen 2 #AWSAmplifyJP
tacck
1
91
AWS Amplify Gen 2 GA記念 ~Gen1との違いを確認
tacck
0
160
Amplify Gen2 が GA したよ! #jawsug_sapporo #jawsug
tacck
0
230
Flutter で "Hello World!! #ゆるWeb札幌
tacck
0
120
AWS Lambda で LLRT を動かしてみた #北海道まったりLT大会
tacck
0
120
地方から始める登壇のステップアップ 〜Java Do から JJUG CCC への登壇参加記録 #javado
tacck
0
170
ゆるWebの新型コロナ Before/After とこれからのこと #seb_yearend
tacck
0
39
AWS Amplify と Amazon Bedrock を使ってオレオレ生成AIサイトを作る #ゆるWeb札幌
tacck
0
270
「普通」のエンジニアとしての生存戦略〜または、いかにして技術を楽しむか。 #情報メディア入門
tacck
0
110
Other Decks in Technology
See All in Technology
急拡大する開発組織を支えるナレッジワークの E2E テスト基盤
kworkdev
PRO
0
150
フロントエンド開発事例③ Yahoo! JAPAN トップページ
lycorptech_jp
PRO
0
110
Kubernetesって何? -大規模なKubernetesを運用するKubernetes as a Serviceチームの話を添えて-
lycorptech_jp
PRO
5
1.4k
自作Cコンパイラ 8時間の奮闘
soukouki
0
860
OR学会2024秋_短期収益と将来のオフ方策評価性能を考慮したクーポン割当方策混合比の決定
recruitengineers
PRO
4
490
OSTという文化を組織に根付かせてみた
sansantech
PRO
2
440
より快適なエラーログ監視を目指して
leveragestech
4
1.5k
突撃! 隣のAmazon Bedrockユーザー 〜YouはどうしてAWSで?〜
minorun365
PRO
3
400
20240912 JJUGナイトセミナー
mii1004
0
140
JTCや セキュリティチェックリストが夢の跡
nikinusu
1
800
ナレッジグラフとLLMの相互利用
koujikozaki
0
430
開発生産性を始める前に開発チームができること / optim-improve-development-productivity.pdf
optim
0
150
Featured
See All Featured
Gamification - CAS2011
davidbonilla
79
5k
Designing on Purpose - Digital PM Summit 2013
jponch
114
6.8k
The Brand Is Dead. Long Live the Brand.
mthomps
53
38k
Testing 201, or: Great Expectations
jmmastey
36
7k
Designing the Hi-DPI Web
ddemaree
278
34k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.9k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Code Review Best Practice
trishagee
62
16k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Building Your Own Lightsaber
phodgson
101
6k
Infographics Made Easy
chrislema
239
18k
Transcript
-BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPM !UBDDL -BSBWFMVJ͍࢝Ί ݄
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ୭ • ໊લ tacck / ݪ •
ॴଐ גࣜձࣾϊʔεσΟςʔϧ • ओ࠵ • ΏΔWebษڧձ@ࡳຈ • εϚʔτεϐʔΧʔͰ༡΅͏ձ@ࡳຈ • ͖ͳϑΟΪϡΞεέʔτͷٕ εϓϨουɾΠʔάϧ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ -BSBWFMY3FMFBTF IUUQTMBSBWFMOFXTDPNMBSBWFM<>
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ͓ͬͦ͘͞ଋͷ QIQBSUJTBONBLFBVUI ϢʔβʔೝূػೳՃ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ $ composer create-project --prefer-dist laravel/laravel blog “6.0.*" $
cd blog $
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ $ composer create-project --prefer-dist laravel/laravel blog “6.0.*" $
cd blog $ php artisan make:auth
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ $ composer create-project --prefer-dist laravel/laravel blog “6.0.*" $
cd blog $ php artisan make:auth Command "make:auth" is not defined. Did you mean one of these? make:channel make:command make:controller make:event make:exception make:factory make:job make:listener
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ࠔͬͨΒެࣜΛ֬ೝ https://laravel.com/docs/6.x/frontend
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ࠔͬͨΒެࣜΛ֬ೝ https://laravel.com/docs/6.x/frontend
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ࠔͬͨΒެࣜΛ֬ೝ https://laravel.com/docs/6.x/frontend
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ࠔͬͨΒެࣜΛ֬ೝ https://laravel.com/docs/6.x/frontend ΊͬͪΌॻ͍ͯ͋Δ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ -BSBWFM͔Βɺ 6*ཁૉlMBSBWFMVJzʹ ͞Ε·ͨ͠ɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ͱ͍͏Θ͚ͰɺެࣜΛݟͳ͕Β ࢼͯ͠Έ·͢ɻ O൪Ḧ͡
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ $ composer create-project --prefer-dist laravel/laravel blog “6.0.*" $
cd blog $
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ $ composer create-project --prefer-dist laravel/laravel blog "6.0.*" $
cd blog $ composer require laravel/ui --dev $ php artisan ui vue --auth $ npm install $ php artisan serve Laravel development server started: http://127.0.0.1:8000 [։ൃ༻αʔόىಈ]
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ [ผλʔϛφϧ] [webpack.mix.js ʹه] ``` mix.browserSync({ proxy: 'http://localhost:8000' });
``` $ npm run dev [BrowserSyncؔ࿈ͷύοέʔδՃͷϝοηʔδ] $ npm run watch [ϒϥβͰ http://localhost:3000/ Λ։͘]
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ 7VFKTͷίϯϙʔωϯτΛ ͬͯΈΔ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ app.js ͱ ExampleComponent.vue εΩϟϑΥʔϧσΟϯά͞Ε͍ͯΔɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ExampleComponent Λݺͼग़͢ɺ example.blade.php Λ࡞ɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ example.blade.php Λݺͼग़͢ ϧʔτΛՃɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ͓·͚ ɹϑϩϯτΤϯυ ɹ-BSBWFM #MBEF Ͱॻ͔͘ ɹ7VFKTͰॻ͔͘
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ϑϩϯτΤϯυͷਓ͕ -BSBWFM #MBEF ʹؔΘͬͨ࣌ʹ ໎͍͕ͪ ˞ݸਓͷײ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ όοΫΤϯυͷਓ ͦͦ7VFKT͕Θ͔Βͳ͍ ɹˠ#MBEFҰ ˞֬৴
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ྫ͑ɺϢʔβʔৄࡉϖʔδΛ ϒϥβͰݟΔͱͯ͠ɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ #MBEFͷΈͷ߹
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ View ϒϥβ Webαʔό Laravel Blade https://www.example.com/user/1
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ View ϒϥβ Webαʔό Laravel Blade HTML HTML HTMLม
ม͞ΕͨHTML͕ ϒϥβͰදࣔ https://www.example.com/user/1
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ #MBEF 7VFKTͷ߹
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ View ϒϥβ Webαʔό Laravel Blade Vue.js https://www.example.com/user/1
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ View ϒϥβ Webαʔό Laravel Blade Vue.js HTML HTML
app.js ม͞ΕͨϑΝΠϧ܈͕ ϒϥβͰදࣔ https://www.example.com/user/1 app.js Vue.js ࣄલʹϏϧυ Blade෦HTMLม
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ View ϒϥβ Webαʔό Laravel Blade Vue.js HTML HTML
app.js ม͞ΕͨϑΝΠϧ܈͕ ϒϥβͰදࣔ https://www.example.com/user/1 app.js Vue.js ࣄલʹϏϧυ Blade෦HTMLม αʔόͷใΛͬͯ HTMLΛΛ࡞ɻ ͜͜ͰJSಈ࡞͍ͯ͠ͳ͍ɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ View ϒϥβ Webαʔό Laravel Blade Vue.js HTML HTML
app.js ม͞ΕͨϑΝΠϧ܈͕ ϒϥβͰදࣔ https://www.example.com/user/1 app.js Vue.js ࣄલʹϏϧυ Blade෦HTMLม ͜͜ͰɺVue.jsͷίϯϙʔωϯτΛ ϒϥβ͕DOMөɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ ը໘ཁૉ࡞λΠϛϯά͕ճ • Laravel ͕ Blade ͔Β HTML ࡞
→ ͜͜Ͱө͞ΕΔͷ *.blade.php ϑΝΠϧ ɹVue.js ͷίϯϙʔωϯτʹʮଐੑʯͰͷҾ͖͠ͷΈɻ ɹͦΕҎ֎ͰɺίϯϙʔωϯτͷதΛૢ࡞Ͱ͖ͳ͍ɻ • ϒϥβ ͕ Vue.js Λ DOM ө → ͜͜Ͱө͞ΕΔͷ app.js (*.vue) ϑΝΠϧ ɹଐੑͰड͚औͬͨͷҎ֎ɺ ɹઐ༻API͕ͳ͍ͱαʔό͔ΒใΛऔΕͳ͍ɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ xxxxxx xxxxxx xxxxxx xxxxxx _ _ __ xxxxxx
xxxxxx xxxxxx
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ xxxxxx xxxxxx xxxxxx xxxxxx _ _ __ xxxxxx
xxxxxx xxxxxx αΠυͷϝχϡʔ͝ͱʹ Blade Ͱ࡞ɻ (ϖʔδભҠΞΫγϣϯ༗Γ) ϖʔδͷσʔλαʔόͰऔಘ͠ɺ Vue.js ͷίϯϙʔωϯτʹଐੑͰҾ͖͠ɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ xxxxxx xxxxxx xxxxxx xxxxxx _ _ __ xxxxxx
xxxxxx xxxxxx ϖʔδͷίϯϙʔωϯτΛ Vue.js Ͱ࡞ɻ λϒΓସ͑ͰͷϖʔδભҠແ͠ɻ Ճใ͕ແ͚Εɺ௨৴ෆཁɻ
!UBDDL -BSBWFMY7VFKTษڧձJOΏΊΈࡳຈWPMMBSBTBQ FOE