Download the PHP package casperwilkes/laravel-helper_commands without Composer

On this page you can find all versions of the php package casperwilkes/laravel-helper_commands. 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 laravel-helper_commands

Laravel Helper Commands

This is a package of simple artisan helper commands to help with the ease of development and some deployment of laravel. It also gives you the ability to write your own helper commands.

After installing this package, a new namespace will appear under artisan list as helper, and make. New commands built with this package will appear under helper by default, unless otherwise specified by command creator.

TOC

Installation

There are a couple steps necessary to get the environment detector up and running.

Composer

To install the package through composer:

Usage

Included with the base package are a couple commands at your disposal.

Back To Top ^

Clear

The clear command will help you do several things. It's biggest use is clearing away old config files and old caches.

Options

If you run the command without any arguments, the default will run.

Arguments

Example Usage

Back To Top ^

Build

The build command is good for releasing, or seeing how the system works with all the caches in place.

Options

If you run the command without any arguments, the default will run.

Example Usage

Back To Top ^

Refresh

The refresh command runs a combination of Clear commands to quickly refresh your current environment.

Options

Arguments

Example Usage

Back To Top ^

DB

The db command runs a combination of db commands.

Note:

Options

Arguments

Example Usage

Back To Top ^

Building Your Own Helpers

Included in this package, is the ability to create your own helper commands easily.

Building your own helpers is incredibly easy. A Helper command is used to create a new helper class ready for you to build.

Note:

Command-Helper

Options

Arguments

Example Usage

To make a new helper, run:

Back To Top ^

Custom Helpers

The make:command-helper command will generate a new, ready to populate, command within the ./app/Console/Helper directory.

The default signature is:

Just update this signature like you would any other command, replacing new-command with your command name. With this implementation, there is no need to register your new command with the Kernel.php, it should be loaded automatically.

If the new Helper does not get loaded auto-magically, you'll need to update your autoloader classes in composer.

Run the following command to rebuild the class cache:

When your new class is created, it's automatically available in artisan too. So if you type php artisan list, under the namespace helper, you'll see you new command waiting:

Also, when this class is created, it automatically initializes the HelperCommandTrait within the commands handle method.

The helper trait comes with some useful tools for quickly building out your own helper commands.

Back To Top ^

Helper Trait

The helper trait is a trait that comes with useful functions to help you build out your custom helper easily. When a new helper command is generated, the init method is automatically populated within the handle. method.

This initialize method handles a variety of different functionality to help start up your development and execution.

Function List

These are the default functions in the HelperCommandTrait


Init

Init will:

Back to Function List ^


getOptions

This function is a mixed bag.

Back to Function List ^


getArguments

Like getOptions, this function is a mixed bag.

Back to Function List ^


adjustProcs

This method is for adjusting procs (actions) for the progress bar. It will allow you to deduct or add procs to your initialized bar.

The procs are set after the options and arguments are parsed from the signature. For options that are true, a proc is added to the procs property. If you want to run extra processing, and let the user know, without having to ask for more information, you can adjust the proc with this method.

So, if you've got 3 options in your signature, and 2 are returned as true, then you'll have 2 procs.

But, if you want to adjust your output to run extra processing, and have the progress bar pick it up. You could use $this->adjustProcs(2), this will add 2 extra procs to the progress bar.

If you want to remove a proc from the progres bar, you would use $this->adjustProcs(-2).

Back to Function List ^


getProcs

This method returns the current amount of procs (actions) that are to run.

Back to Function List ^


finishLine

This is purely and output function to display the total amount of execution time the command took, and the status of the progress bar

Back to Function List ^


displayTimer

This method will display the amount of time the command execution has taken. You can use this by itself if you don't wish to use the progress bar.

Back to Function List ^


delete

This function will take a file path, and remove that file from the filesystem.

Back to Function List ^


compress

This method will take a file path, and compress that file within the filesystem.

Back to Function List ^


setProcs

This function sets the initial procs for the command. You can hard-code the amount of actions directly with this method.

Back to Function List ^


Bar Advance

This is progress bar native function. Because we initialize the property bar as a progress bar, we have access to it's methods.

To advance the bar, call this within the command

Back to Function List ^

Adding Your Own Methods

In order to add your own methods to the HelperCommandTrait, you will need to publish the vendor assets.

Back To Top ^

Publish

Publishing the HelperCommandTrait is easy. Run the following artisan command to get the trait published to the ./app/Console/Helper/Custom directory.

Publish Command

Publish using the tag:

After the trait is published, you may need to dump the composer autoloader and clear your caches:

Back To Top ^


All versions of laravel-helper_commands with dependencies

PHP Build Version
Package Version
No informations.
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 casperwilkes/laravel-helper_commands contains the following files

Loading the files please wait ....