Laravel Zero was created by, and is maintained by Nuno Maduro, and is a micro-framework that provides an elegant starting point for your next console application. Unofficial and customized version of Laravel optimized for building console/shell/command-line applications.
- Build on top of the Laravel 5 components.
- Built with PHP 7 using modern coding standards.
- Ships with a standalone compiler.
- Automatic Dependency Injection on commands and support of Laravel 5 Service Providers.
- Supports desktop notifications on Linux, Windows or MacOS.
Feel free to check out the change log, releases, license, and contribution guidelines.
PHP 7.1+
To get the latest version of Laravel Zero, simply create a new project using Composer:
$ composer create-project --prefer-dist nunomaduro/laravel-zero application
Place yourself into the application folder, and execute the application:
$ php application
Laravel Zero provides a default command placed in app/DefaultCommand.php
You may review the documentation of the Artisan Console component on Laravel Official Website.
The configuration of your console application goes on config\config.php
. On this file, you should
define your application list of commands and your Laravel Service Providers configuration.
/*
* Here goes the application name.
*/
'name' => 'Laravel Zero',
/*
* Here goes the application version.
*/
'version' => '1.0.0',
/*
* Here goes the application default command.
*
* You may want to remove this line in order to ask the user what command he
* wants to execute.
*/
'default-command' => App\DefaultCommand::class,
/*
* Here goes the application list of commands.
*
* Besides the default command the user can also call
* any of the commands specified below.
*/
'commands' => [
ZeroFramework\Commands\Builder::class,
ZeroFramework\Commands\Renamer::class,
],
/*
* Here goes the application goes the list of Laravel Service
* Providers. Enjoy all the power of Laravel on your console.
*/
'providers' => [
\NunoMaduro\LaravelDesktopNotifier\LaravelDesktopNotifierServiceProvider::class,
],
Your Laravel Zero project, by default, allows you to build a standalone phar archive to ease the deployment or the distribution of your project.
$ php application build <name>
The build will provide a single phar archive, ready to use, containing all the code of your project and its dependencies.
Note that the generated file will still need a PHP installation respecting your project's requirements (PHP version, extensions, etc.) on the users' computers to be used. You will then be able to execute it directly:
$ ./builds/<name>
or on Windows:
C:\application\path> php builds\<name>
The git branching model used for development is the one described and assisted by twgit
tool: https://github.com/Twenga/twgit.
For latest releases and announcements, follow on Twitter: @enunomaduro
This project uses code from several open source packages.
Laravel Zero is open-sourced software licensed under the MIT license.
Copyright (c) 2017-2017 Nuno Maduro