Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4d53d54

Browse filesBrowse files
committed
Updates readme
1 parent 14b3e01 commit 4d53d54
Copy full SHA for 4d53d54

File tree

Expand file treeCollapse file tree

2 files changed

+81
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+81
-4
lines changed

‎app/Console/Commands/Main.php

Copy file name to clipboardExpand all lines: app/Console/Commands/Main.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Main extends Command
2323
/**
2424
* Execute the console command.
2525
*/
26-
public function fire()
26+
public function handle()
2727
{
2828
$this->info('Love beautiful code? We do too.');
2929
}

‎readme.md

Copy file name to clipboardExpand all lines: readme.md
+80-3Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,30 @@
1111
<img src="http://i.imgur.com/MSfhukT.png" alt="Laravel Zero" />
1212
</p>
1313

14-
## Intro
14+
# Laravel Zero
1515

16-
Laravel Zero provides the perfect starting point for your next Laravel Console Application.
16+
- [Introduction](#introduction)
17+
- [Installation](#installation)
18+
- [Server Requirements](#server-requirements)
19+
- [Documentation](#documentation)
20+
- [Stay in touch](#stay-in-touch)
21+
- [License](#license)
1722

18-
Is an MIT-licensed open source project UNDER DEVELOMENT.
23+
<a name="introduction"></a>
24+
## Introduction
1925

26+
Laravel Zero provides an elegant starting point for your next Laravel Console Application.
27+
28+
Is an MIT-licensed open source project UNDER DEVELOMENT.
29+
30+
<a name="server-requirements"></a>
2031
## Server Requirements
2132

2233
<div class="content-list" markdown="1">
2334
- PHP >= 5.6.4
2435
</div>
2536

37+
<a name="installation"></a>
2638
## Installation
2739

2840
Laravel Zero utilizes [Composer](https://getcomposer.org) to manage its dependencies. So, before using Laravel Zero, make sure you have Composer installed on your machine.
@@ -31,10 +43,75 @@ Install Laravel Zero by issuing the Composer `create-project` command in your te
3143

3244
composer create-project --prefer-dist nunomaduro/laravel-zero application-name
3345

46+
<a name="documentation"></a>
47+
## Documentation
48+
49+
Laravel Zero provides a main command. That is the default one of your application, placed in app/Console/Commands/Main.php. You should fill in the `signature` and `description` properties of the class, which will be used when displaying your command on the `list` screen. The `handle` method will be called when your command is executed. You may place your command logic in this method.
50+
51+
Let's take a look at an example command.
52+
53+
<?php
54+
55+
namespace App\Console\Commands;
56+
57+
use App\DripEmailer;
58+
use Illuminate\Console\Command;
59+
60+
class SendEmails extends Command
61+
{
62+
/**
63+
* The name and signature of the console command.
64+
*
65+
* @var string
66+
*/
67+
protected $signature = 'email:send {email}';
68+
69+
/**
70+
* The console command description.
71+
*
72+
* @var string
73+
*/
74+
protected $description = 'Send drip e-mails to a email';
75+
76+
/**
77+
* The drip e-mail service.
78+
*
79+
* @var DripEmailer
80+
*/
81+
protected $drip;
82+
83+
/**
84+
* Create a new command instance.
85+
*
86+
* @param DripEmailer|null $drip
87+
* @return void
88+
*/
89+
public function __construct(DripEmailer $drip)
90+
{
91+
parent::__construct();
92+
93+
$this->drip = $drip ?: new DripEmailer;
94+
}
95+
96+
/**
97+
* Execute the console command.
98+
*
99+
* @return mixed
100+
*/
101+
public function handle()
102+
{
103+
$this->drip->send($this->argument('email'));
104+
}
105+
}
106+
107+
You may review the documentation of the Artisan Console component [on Laravel Official Website](https://laravel.com/docs/5.4/artisan).
108+
109+
<a name="stay-in-touch"></a>
34110
## Stay In Touch
35111

36112
- For latest releases and announcements, follow on Twitter: [@enunomaduro](https://twitter.com/enunomaduro)
37113

114+
<a name="license"></a>
38115
## License
39116

40117
[MIT](http://opensource.org/licenses/MIT)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.