PHP code example of casperwilkes / laravel-helper_commands

1. Go to this page and download the library: Download casperwilkes/laravel-helper_commands library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

casperwilkes / laravel-helper_commands example snippets


protected $signature = 'helper:new-command';

 helper
  helper:build           Builds necessary caches for optimization. Runs `-a` flag by default.
  helper:clear           Clears out cached information, compresses sessions and logs. Runs `-a` flag by default. Delete must specifically be set to run.
  helper:db              Runs database migrations and seeds if chosen. Runs `-a` flag by default.
> helper:new-command     Command description
> helper:test            This is a test command
  helper:refresh         Clears out previous optimizations and rebuilds new ones. Runs `-a` flag by default.
 key
  key:generate           Set the application key


/**
 * Initializes common properties
 * @param bool $progress Whether to initialize progress bar
 * @return void
 */
protected function init(bool $progress = true): void {}

/**
 * Gets the local options. If key is passed, returns just that value
 * @param string $key Key to parse
 * @param mixed $default Default value to return if key is not found
 * @return mixed|array Single value or array of values
 */
protected function getOptions(string $key = '', $default = null) {}

/**
 * Gets the local arguments. If key is passed, returns just that value.
 * @param string $key Key to parse
 * @param mixed $default
 * @return mixed|array Single value or array of values
 */
protected function getArguments(string $key = '', $default = null) {}

/**
 * Adjusts the amounts of procs
 * @param int $amount
 * @return void
 */
protected function adjustProcs(int $amount): void {}

/**
 * Gets the procs
 * @return int
 */
protected function getProcs(): int {}

/**
 * Runs a diagnostic total
 * @return void
 */
protected function finishLine(): void {}

/**
 * Displays an execution timer
 * @return void
 */
protected function displayTimer(): void {}

/**
 * Removes a file by path
 * @param string $path path to file
 * @return bool
 */
protected function delete(string $path): bool {}

/**
 * Compresses a file by path
 * @param string $path path to file
 * @return bool
 */
protected function compress(string $path): bool {}

/**
 * Sets the procs for the progress bar
 * @param int|null $override Hardcode Override value for procs
 * @return void
 */
protected function setProcs(int $override = null): void {}

$this->bar->advance();

$ php artisan helper:clear

$ php artisan helper:clear delete

$ php artisan helper:clear -bc

$ php artisan helper:build -r

$ php artisan helper:build -cr

$ php artisan helper:refresh

$ php artisan helper:db -wfs

$ php artisan make:command-helper HelperTestCommand

$ php composer dumpautoload

php artisan vendor:publish --tag=helper-commands

$ php composer dumpautoload
$ php artisan helper:clear