Download the PHP package escapework/laravel-asset-versioning without Composer

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

Laravel - Assets Versioning

Latest Stable Version Downloads Build Status License MIT

Disclaimer: This package is not really maintained anymore, we recommend you use the Laravel Mix versioning instead.

Have you ever had a problem with cache in your assets? This package may help you.

Version Compatibility

Laravel Laravel Assets Versioning
6.x/7.x/8.x 0.8.x
5.5+ 0.7.x
5.4.x 0.6.x
5.3.x 0.5.x
5.2.x 0.4.x
5.1.x 0.3.x
5.0.x 0.2.x
4.2.x 0.1.x

Installation

Via Composer:

And publish the configurations running the following command:

Usage

Instead of using the asset helper, you will need to use the Asset:v method.

Imagine that your layout template has the following lines:

In your local environment, nothing changes. But in production, you just need to run the following command every time you need to update your assets' version:

And your layout will be rendered as this:

The version is the timestamp when you performed the asset:dist command.

This package knows which folder you need by the file extension, which is the array key in the config file.

You also can get only the path for some extension:

HTTP2 Server Push

You can also enable the HTTP2 Server Push header for all assets used with this package.

For that, you need to add the HTTP2ServerPush to the middlewares of your application.

And that's it, your response will come with the Link HTTP header.

If you want to add some assets that are not versioned, you can use this method:

Configurations

Of course you can configure the folders you need. Just edit the config/assets.php file, in the types array.

You also can add more folders by adding more items into the array.

Also, you can configure in which environments the assets are gonna be versioned.

Changelog

See Changelog.

Unit tests

Just run vendor/bin/phpunit.

License

See the License file.


All versions of laravel-asset-versioning with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.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 escapework/laravel-asset-versioning contains the following files

Loading the files please wait ....