Download the PHP package henrotaym/laravel-helpers without Composer

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

Laravel helpers

A kit of usefull helpers accessible via a facade.

Installation

composer require henrotaym/laravel-helpers

Access the facade

use Henrotaym/LaravelHelpers/Facades/Helpers;

Available methods

Try

/**
* Trying to execute given callback with given args.
*
* @param callable $callback function to try.
* @param mixed $args arguments to give to callback.
* @return array First element is error (if any), second is response(if no error).
*/

public function try(callable $callback, ...$args): array;

Optional

/**
 * Trying to access nested property.
 * 
 * @param object $element
 * @param string|array $nested_properties Nested properties. Methods should be like ['method_name' => [$arg1, $arg2]] OR method_name() if it doesn't need arguments.
 * @return Illuminate\Support\Optional Nullable nested property.
 */
public function optional(object $element, ...$nested_properties): Illuminate\Support\Optional

doIfJobIsInstanceOf

/**
 * Executing given callback if serialized job is instance of given element.
 * 
 * @param Job $job
 * @param mixed $instance_of Same parameter types as native php instanceof.
 * @param callable $callback It receives job instance as first parameter.
 * @return mixed Callback returned value or null if any error.
 */
public function doIfJobIsInstanceOf(Job $job, $instance_of, callable $callback);

uuid

 /**
 * Creating unique uuid.
 * 
 * @param bool $allow_dash Telling if dashes are allowed in created uuid.
 * @return string
 */
public function uuid(bool $allow_dash = false): string;

str_contains

/**
 * Telling if given string contains given substring.
 * 
 * @param string $haystack The string to search in.
 * @param string $needle The string to search for.
 * @return bool
 */
public function str_contains(string $haystack, string $needle);

getDirectory

/**
 * Getting directory where the file is located.
 * 
 * @param string $class
 * @return string|null Null if any error.
 */
public function getDirectory(string $class): ?string;

All versions of laravel-helpers with dependencies

PHP Build Version
Package Version
Requires henrotaym/laravel-test-suite Version ^2.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 henrotaym/laravel-helpers contains the following files

Loading the files please wait ....