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
shin.joko
August 28, 2020
Programming
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravelコマンド作成
inspireコマンドの日本語Vertを作成してみる
shin.joko
August 28, 2020
More Decks by shin.joko
See All by shin.joko
Laravel blade include・yield・sectionの違い
shinjoko
0
450
Other Decks in Programming
See All in Programming
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.1k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
660
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
AWSに止められる覚悟してますか?
morizo_1984
2
540
The Rails Doctrine Decade
koic
2
590
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
Jetpack Compose Mechanisms
skydoves
3
820
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Mobile First: as difficult as doing things right
swwweet
225
10k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Mind Mapping
helmedeiros
1
400
Site-Speed That Sticks
csswizardry
13
1.6k
How to build a perfect <img>
jonoalderson
1
6.1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
990
Transcript
Laravelコマンド作成 php artisan inspireの日本語Verを作ってみる CLOCK・IT,inc All Rights Reserved.
「inspire」コマンドとは コマンドを実行するといくつかの格言からランダムで格言を取得して表示される
実際のロジックを見てみる 見るファイル ・ ~/routes/console.php ・ ~/vender/laravel/src/illuminate/Foundation/Inspiring.php
None
※一部省略してます
日本語の格言が出るものを 作っていく
artisanコマンドの作り方 実現方法として、2パターン存在する ・inspireと同じ作りで、~/routes/console.php に作成する ・~/app/Console 内に作成する
inspireと同じ作りにて作成
inspireと同じ作りにて作成 console.phpにコマンドを追加
適当なディレクトリに格言リストを用意 ※元となるInspiringをextendsしているが、しなくて問題ない ※「static」に注意
実行してみる
/app/Console 内に作成
/app/Console 内に作成 コマンドの作成は「make」コマンドを利用する <書き方> $ php artisan make:command クラス名 ↓
$ php artisan make:command InspiringCommand
~/app/Console/Commands/ InspiringCommand.php
コマンド名を指定 ディスクリプションを記載 実処理を記述
実際に書いていく コマンド名は自由に命名可能 (ディスクルプションも) 実処理に関しては、console.phpで書いたものと同じ
※ useが必要 ※ 実行する内容はconsole.phpと全く同じ
実行してみる
コマンドの作成は完了! $this->comment(); を使っているが、実処理に関してはソースを読んでみてね! ~/vender/laravel/framework/src/illuminate/Console/Concerns/InteractsWithIO.php とか・・・