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
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
130
Papers, Please! API Authentication with Laravel Passport
hskrasek
1
770
Laravel Doctrine
hskrasek
1
480
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
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
120
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.1k
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
100
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
4
2.5k
AHC070解法紹介
eijirou
0
120
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.9k
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
140
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
360
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
490
30 Presentation Tips
portentint
PRO
1
390
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
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