Download the PHP package deerdama/console-zoo-laravel without Composer

On this page you can find all versions of the php package deerdama/console-zoo-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package console-zoo-laravel

Console Zoo For Laravel

The purpose of this laravel package is to easily make console outputs less boring, and to be able to quickly style the content and add various icons at any time. Plus a couple more helpers like time and duration outputs, including laps splitting.

Methods with typical predefined formats are included: success, info, warning, error.






Installation

composer require deerdama/console-zoo-laravel


:grey_exclamation: Laravel versions: There shouldn't be any issues on >= 5.0 (used and tested on a bunch of versions from 5.X, 6.X, 7.X and 8.x and everything worked normally on all of those)

:exclamation: If you'll want to change some default parameters then you'll need to publish the config file:

php artisan vendor:publish --provider=Deerdama\\ConsoleZoo\\ConsoleZooServiceProvider



Display All Options

To see all the available colors and icons and to check how they'll look in your console you can run the artisan command php artisan zoo:options

:grey_exclamation: Keep in mind that the icons/colors might not look exactly the same as the screenshots, and some might not even work for you, this depends on the console used (plus some other circumstances) and can't be controlled by the package itself. If you want to know more about the behind the scenes reason, and about the limitations, then you can find some info for example here... or just google it



Available Parameters

All parameters are optional.

Name Description Type
color ** text color string | int | array
background ** background color string | int | array
icons ** icon/s to display string | array | bool
icons_right ** icon/s at the end of the message string | array | bool
timestamp ** adds timestamp in front of the output bool
bold increase text intensity
faint decrease text intensity
italic apply italic style to text
underline underline text
underline_double double underline text
crossed cross out the text
overline add overline to text
blink blink outputted text
swap swap the text and background colors
category this is for the random icon only string
tz available for the timestamp(); ** string
format available for the timestamp() and duration() ** string
prepend_text available for the lap()**. Can output the current lap number by adding {lap_number} string
append_text available for the lap()**. Can output the current lap number by adding {lap_number} string


Basic Usage

Result




Defaults And Config

Result

Result

Result



Timestamps and Duration

or it can be setup as default behaviour by changing the 'timestamp' => false to true in the published config zoo.php.



Changing Colors

Text and background colors can be changed through the color and background parameters.

There are multiple predefined colors that can be displayed through the artisan command. There are all the basic colors and each of them has few lighter/darker/bright options. For example blue also has blue_light_1, blue_dark_2, blue_bright_2 etc... Most colors fo up to xxx_light_4, xxx_dark_4 and xxx_bright_3

The colors can be passed in multiple ways:

  1. string - name of the color: ['color' => 'red', 'background' => 'blue_dark_1']
  2. array - Use array to pass any color as rgb: ['color' => [255, 0, 0], 'background' => [0, 0, 255]]
  3. integer - You can pass the ANSI color codes directly as int: ['color' => 1, 'background' => 4]
  4. mix - If you want to take advantage of your IDE then you can always use the defined constants in \Deerdama\ConsoleZoo\Color directly ['color' => Color::RED, 'background' => Color::BLUE]

Use the artisan command to see all the predefined colors...

colors

and so on....



Using Icons

Result

There are over 700 predefined icons, Use the artisan command to display all the available icons... (Tip: You can filter by category if you choose the option to show "icons" only)

and so on...



Inline usage

Result

Result


All versions of console-zoo-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package deerdama/console-zoo-laravel contains the following files

Loading the files please wait ....