承接 jralph/laravel-artisan-colour 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jralph/laravel-artisan-colour

Composer 安装命令:

composer require jralph/laravel-artisan-colour

包简介

README 文档

README

A simple extension of the laravel Illuminate\Console\Command object to add some colour functionality.

Laravel's artisan already has some colour features using the info, error, comment and line methods, but it does not give you all of them. This package lets you use all of the available ANSI colours with the line method.

Install

Installation is nice and simple using composer.

Add the package to your composer.json file.

"require": {
    ...
    "jralph/laravel-artisan-colour": "1.*"
}

Once done, run a composer update and follow the setup below.

Setup

Setup is nice and simple and only requires two steps.

  1. Add 'Jralph\LaravelArtisanColour\LaravelArtisanColourServiceProvider', to your app/config/app.php providers array.
  2. Make sure that any classes you want to use the colours extend Jralph\LaravelArtisanColour\Console\Command.

Usage

Using the colours is easy and straight forward.

Colours are only available on the $this->line(); method as the others already have colours associated with them.

Syntax:

- __With Background__: `$this->line('This is some text.', 'text_colour:background_colour');`
- __Only Test__: `$this->line('This is some text.', 'text_colour');`

Available Colours

Below is a list of all available text colour and background colours.

  • Black
  • White
  • Red
  • Green
  • Blue
  • Yellow
  • Cyan
  • Magenta

Using a combination of the above colours with the package will give you the desired text/background colours.

Optional Config

The package also includes optional configuration that you may change if desired.

Publish the config: php artisan config:publish jralph/LaravelArtisanColour

config.php

This file contains a single option. Should the colours be output when using windows.

If this option is true, the package will output the ansi colour codes. If you do not have your command line setup to read these codes and set the colours, then you may want to set this option to false.

ansi.php

This file contains settings for all of the colours.

In this file you can set the default text colour (white) and default background colour (black).

统计信息

  • 总下载量: 53
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固