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 Zero
Search
Hunter Skrasek
May 03, 2018
Programming
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravel Zero
Talk presented at
https://www.meetup.com/Laravel-Austin/events/jrzzbpyxhbfb/
Hunter Skrasek
May 03, 2018
More Decks by Hunter Skrasek
See All by Hunter Skrasek
Type Safety and Compilation Checks: How Static Analysis Can Benefit Your Team
hskrasek
0
120
Papers, Please! API Authentication with Laravel Passport
hskrasek
1
750
Laravel Doctrine
hskrasek
1
470
How Laravel Makes Your Life Easier
hskrasek
0
160
Refactoring to Collections
hskrasek
2
1.4k
API's and You - Pt. 2
hskrasek
0
110
API's and You
hskrasek
2
160
Other Decks in Programming
See All in Programming
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
0
290
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
960
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
460
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
330
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
860
yield再入門 #phpcon
o0h
PRO
0
550
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
510
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
250
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
220
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
The SEO Collaboration Effect
kristinabergwall1
1
510
Being A Developer After 40
akosma
91
590k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
350
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Transcript
Laravel Zero Laravel Zero - Laravel Austin 1
Micro-framework for command-line applications Provides an elegant starting point for
your console application Laravel Zero - Laravel Austin 2
Installation Laravel Zero - Laravel Austin 3
Installation — composer global require "laravel-zero/installer" Laravel Zero - Laravel
Austin 3
Installation — composer global require "laravel-zero/installer" — composer create-project --prefer-dist
laravel-zero/ laravel-zero movie-cli Laravel Zero - Laravel Austin 3
Commands By default Laravel Zero comes with a InspiringCommand as
an example php <your-app-name> make:command <NewCommand> Laravel Zero - Laravel Austin 4
Desktop Notifications $this->notify("Hello Web Artisan", "Love beautiful..", "icon.png"); Laravel Zero
- Laravel Austin 5
Tasks $this->task("Installing Laravel", function () { return true; }); $this->task("Doing
something else", function () { return false; }); Laravel Zero - Laravel Austin 6
Interactive Menus $option = $this->menu('Pizza menu', [ 'Freshly baked muffins',
'Freshly baked croissants', 'Turnovers, crumb cake, cinnamon buns, scones', ])->open(); $this->info("You have chosen the option number #$option"); $this->menu($title, $options) ->setForegroundColour('green') ->setBackgroundColour('black') ->setWidth(200) ->setPadding(10) ->setMargin(5) ->setExitButtonText("Abort") // remove exit button with // ->disableDefaultItems() ->setUnselectedMarker('❅') ->setSelectedMarker('✏') ->setTitleSeparator('*-') ->addLineBreak('<3', 2) ->addStaticItem('AREA 2') ->open(); Laravel Zero - Laravel Austin 7
Service Providers Laravel Zero recommends using Service Providers for defining
concrete implementations Laravel Zero - Laravel Austin 8
Config Laravel Zero utilizes the same configuration system as Laravel.
'production' => true, Laravel Zero - Laravel Austin 9
Database Laravel Zero allows you to install a Laravel's Eloquent
component php <your-app-name> app:install database Laravel Zero - Laravel Austin 10
Logging php <your-app-name> app:install log Laravel Zero - Laravel Austin
11
Filesystem Laravel Zero ships with the Filesystem component by default
use Illuminate\Support\Facades\Storage; Storage::put("reminders.txt", "Task 1"); Laravel Zero - Laravel Austin 12
Scheduler Laravel Zero ships with the Task Scheduling system of
Laravel * * * * * php /path-to-your-project/your-app-name schedule:run >> /dev/null 2>&1 public function schedule(Schedule $schedule): void { $schedule->command(static::class)->everyMinute(); } Laravel Zero - Laravel Austin 13
Environment Configuration Laravel Zero also supports DotEnv based environment configuration
php <your-app-name> app:install dotenv Laravel Zero - Laravel Austin 14
Collision A detailed and intuitive error handler framework for console
applications Laravel Zero - Laravel Austin 15
Tinker Laravel Zero is a powerful REPL for Laravel Laravel
Zero - Laravel Austin 16
Tests use Tests\TestCase; use Illuminate\Support\Facades\Artisan; class InspiringCommandTest extends TestCase {
/** * A basic test example. */ public function testInspiringCommand(): void { Artisan::call('inspiring'); $this->assertContains('Leonardo da Vinci', Artisan::output()); } } Laravel Zero - Laravel Austin 17
DEMO Laravel Zero - Laravel Austin 18