Download the PHP package protonemedia/laravel-mixins without Composer

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

Laravel Mixins

Latest Version on Packagist Total Downloads Buy us a tree

Sponsor this package!

❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider sponsoring the maintenance and development. Keeping track of issues and pull requests takes time, but we're happy to help!

Requirements

Installation

You can install the package via composer:

There's no Service Provider or automatic discovery/registration of anything. All features are opt-in.

Contents

Blade Directives

Console Commands

Validation Rules

String Macros

PDF

Request

Blade Directives

You can register Blade Directives by calling the directive method on the class. You can change the name of a directive with the optional first argument.

Decimal Money Formatter

Note: This directive requires the moneyphp/money package.

Register the directive, for example by adding it to your AppSerivceProvider:

You can customize the name of the directive and the default currency code:

The first argument of the directive is the amount in cents. The second optional parameter is the currency.

Intl Money Formatter

Note: This directive requires the moneyphp/money package.

Register the directive, for example by adding it to your AppSerivceProvider:

You can customize the name of the directive, the default currency code and the locale:

The first argument of the directive is the amount in cents. The optional second parameter is the currency. The optional third parameter is the locale.

Commands

Generate Sitemap

Note: This command requires the spatie/laravel-sitemap package.

You can register the command by adding it to your App\Console\Kernel file, or by calling the register method on the class.

You can also set a custom signature:

It generates a sitemap of your entire site and stores in in the public folder as sitemap.xml.

Validation Rules

Current password

Passes if the value matches the password of the authenticated user.

As of Laravel 9, this validation rule is built-in.

Dimensions With Margin

Extension of the Dimensions rule with a margin option. Handy when you're working with ratios with repeating decimals.

Host

Verifies if the URL matches the given hosts.

In Keys

Verifies if the given key or index exists in the array.

Max Words

Passes if the values contains no more words than specified.

URL Without Scheme

Passes if the URL is valid, even without a scheme.

String macros

You can add new method by using the mixins.

Compact

It has an optional second argument to specify the length on each side. With the optional third argument, you can specify the sepeator.

Human Filesize

Converts a filesize into a human-readable version of the string.

Text

Note: This macro requires the html2text/html2text package.

Converts HTML to plain text.

URL

Prepends https:// if the scheme is missing from the given URL.

Seconds to time

Converts seconds to a 'mm:ss' / 'hh:mm:ss' format.

PDF Regeneration

Note: Requires the symfony/process package.

Regenerates the PDF content with Ghostscript.

You can specify the path of the ghostscript binary as well:

Convert Base64 input data to files

Add the ConvertsBase64ToFiles trait and base64FileKeys method to your form request.

Now you can get the files like regular uploaded files:

This trait supports nested data as well. You can either reference the keys by a nested array, or with a dotted notation:

Want to know more about this trait? Check out the blog post.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Other Laravel packages

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Treeware

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.


All versions of laravel-mixins with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1 || ^8.2 || ^8.3
illuminate/support 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 protonemedia/laravel-mixins contains the following files

Loading the files please wait ....