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 Zero
Search
Hunter Skrasek
May 03, 2018
Programming
170
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
130
Papers, Please! API Authentication with Laravel Passport
hskrasek
1
770
Laravel Doctrine
hskrasek
1
490
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
170
Other Decks in Programming
See All in Programming
速習iPhone Duo対応
yuukiw00w
2
970
contenteditable と日本語入力に向き合う
colorful12
0
180
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
120
Kubernetes祭り #2 OP/ED
bells17
0
110
最近”作らせてる” ローカルAIアプリの話
akit37
0
420
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
160
Domain-Driven Transformation
hschwentner
2
2.3k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
510
AWSに止められる覚悟してますか?
morizo_1984
2
520
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
120
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
RailsConf 2023
tenderlove
30
1.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
How to Talk to Developers About Accessibility
jct
2
570
Optimizing for Happiness
mojombo
378
71k
Chasing Engaging Ingredients in Design
codingconduct
0
350
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
450
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
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