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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
520
Creating Composable Callables in Contemporary C++
rollbear
0
200
霧の中の代数的エフェクト
funnyycat
1
350
1B+ /day規模のログを管理する技術
broadleaf
0
130
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
260
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
210
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
110
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
460
初めてのKubernetes 本番運用でハマった話
oku053
0
120
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
どこまでゆるくて許されるのか
tk3fftk
0
480
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
410
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Scaling GitHub
holman
464
140k
Leo the Paperboy
mayatellez
8
1.9k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Building Applications with DynamoDB
mza
96
7.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
RailsConf 2023
tenderlove
30
1.5k
We Have a Design System, Now What?
morganepeng
55
8.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
260
Into the Great Unknown - MozCon
thekraken
41
2.6k
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