Download the PHP package axn/tool-kit-for-laravel without Composer

On this page you can find all versions of the php package axn/tool-kit-for-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 tool-kit-for-laravel

Tool Kit for Laravel (formerly "Laravel extension")

Includes a set of useful tools for the Laravel framework.

Installation

With Composer :

To use some of these tools you must have correctly installed the package forxer/generic-term-translations-for-laravel already prerequisite by this package (therefore present).

Use the locales publisher of Laravel Lang to add/update/reset or remove translations:

Helpers

app_env_enum()

Returns a standardized enumeration of the application environment based on the "app.env" configuration variable. This helper uses the AppEnv enumeration.

Note that the return value is static, it always returns the first value in the same request. If the environment is modified at runtime, this will not be taken into account (but who does that?).

For more details please see the chapter on AppEnv enumeration.

app_env_name()

Returns a standardized name of the application environment based on the "app.env" configuration variable. This helper uses the AppEnv enumeration.

Note that the return value is static, it always returns the first value in the same request. If the environment is modified at runtime, this will not be taken into account (but who does that?).

For more details please see the chapter on AppEnv enumeration.

carbon()

Create a Carbon instance from a date string, a DateTime instance or a timestamp.

Here are some examples.

Using Carbon:

Equivalents using helper:

collect_models()

Create a collection of Eloquent models.

str_html()

Create an Illuminate\Support\HtmlString instance.

linebreaks()

Convert all line-endings to UNIX format.

Replace "\r\n" and "\r" by "\n"

nl_to_p()

Convert new lines into HTML paragraphs <p>.

nl_to_br()

Alias of native PHP function nl2br().

number_formated()

Returns a number in current language format.

number_fr()

Returns a number in french format.

compute_dec_to_time()

Decimal to time calculation, return an array with hours, minutes and seconds.

convert_dec_to_time()

Decimal to time conversion. Output can be changed with sprintf format.

human_readable_bytes_size()

Convert a bytes size into a human readable localized size.

mime_type_to_fa5_class()

Return a font awesome file icon class for specific MIME Type.

trans_ucfirst()

Translate the given message with first character uppercase.

is_valid_model()

Indicates whether the model class is instantiable and is an instance of Illuminate\Database\Eloquent\Model.

semver_to_id()

Transforms a semver version number into a numeric identifier. Please note: does not take into account "pre-releases" (RC, beta, etc.)

This is useful for optimizing comparisons, searches and sorting in a database on numeric rather than text columns.

Blade directives

@nltop()

Convert new lines into HTML paragraphs <p>.

Displays:

@nltobr()

Convert new lines into HTML <br>

Displays:

Components

Add an indicator for a required field

To display a required field marker (e.g. in a label tag):

Displays:

You can change the default symbol "*" (an asterisk) by the marker symbol of your choice:

You can style it for example like this:

In your forms you can indicate the required fields for example in this way:

Enums

Environment application

This package provides a utility enum AppEnv. This allows to standardize environment names.

Indeed, for example, some projects uniformly have the environment "prod" and "production"; or even "preprod" and "pre-production", worse: "pre-prod".

Creating an instance of the enumeration from a character string:

Find the standardized name from a string:

Testing the environment type:

Reverse methods are available:

Retrieving environment values ​​defined in the enum:

Civilities

An enumeration to handle civilities is available with Axn\ToolKit\Enums\Civilities

@todo: need to document this


All versions of tool-kit-for-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer/semver Version ^3.0.0
forxer/generic-term-translations-for-laravel Version ^1.8
laravel/framework Version ^10.0 || ^11.0
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 axn/tool-kit-for-laravel contains the following files

Loading the files please wait ....