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

rubythonode/laravel-zero

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Quality Code Coverage Total Downloads Latest Stable Version License

Laravel Zero

Laravel Zero

Introduction

Laravel Zero provides an elegant starting point for your next Laravel Console Application.

Is an MIT-licensed open source project UNDER DEVELOMENT.

Server Requirements

- PHP >= 5.6.4

Installation

Laravel Zero utilizes Composer to manage its dependencies. So, before using Laravel Zero, make sure you have Composer installed on your machine.

Install Laravel Zero by issuing the Composer create-project command in your terminal:

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

Documentation

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.

Let's take a look at an example command.

<?php

namespace App\Console\Commands;

use App\DripEmailer;
use Illuminate\Console\Command;

class SendEmails extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'email:send {email}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Send drip e-mails to a email';

    /**
     * The drip e-mail service.
     *
     * @var DripEmailer
     */
    protected $drip;

    /**
     * Create a new command instance.
     *
     * @param  DripEmailer|null  $drip
     * @return void
     */
    public function __construct(DripEmailer $drip = null)
    {
        parent::__construct();

        $this->drip = $drip ?: new DripEmailer;
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->drip->send($this->argument('email'));
    }
}

You may review the documentation of the Artisan Console component on Laravel Official Website.

Stay In Touch

  • For latest releases and announcements, follow on Twitter: @enunomaduro

License

MIT

Copyright (c) 2017-2017 Nuno Maduro

About

Laravel Zero provides the elegant starting point for your next Laravel Console Application 👌

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.