Download the PHP package boyo/asset-cdn without Composer

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

Latest Stable Version GitHub Workflow Status Codecov Quality Score Total Downloads

Serve Laravel Assets from a Content Delivery Network (CDN)

Introduction

This package lets you push, sync, delete and serve assets to/from a CDN of your choice e.g. AWS Cloudfront.
It adds helper methods mix_cdn() and asset_cdn().

Simple Illustration

Installation

Install this package via composer:

Also register the service provider:
Only required for Laravel <=5.4, for Laravel >=5.5 auto-discovery is enabled.

Notes:

Configuration

1. Configure Filesystem

Only required if you plan to manage your assets via the provided commands: asset-cdn:push, asset-cdn:sync, asset-cdn:empty

arubacao/asset-cdn utilizes Laravel's Filesystem to push, sync, delete assets to/from the CDN of your choice. Therefore, you have to configure and define a filesystem specific for CDN purposes. Please follow the official documentation.

If you plan to use AWS S3/Cloudfront you can use this configuration:

2. Publish Config File

3. Edit cdn_url and filesystem.disk

4. Edit files in config/asset-cdn.php

Only required if you plan to manage your assets via the provided commands: asset-cdn:push, asset-cdn:sync, asset-cdn:empty

files always assumes a relative path from the public directoy

5. Set Additional Configurations for Uploaded Files

filesystem.options are passed directly to the Filesystem which eventually calls the underlying Storage driver e.g. S3.
Please refer to the corresponding storage driver documentation for available configuration options.
The following example is recommended for AWS S3.

6. Set Environment Variable USE_CDN

Usage

Commands

Recommended
Sync assets that have been defined in the config to the CDN. Only pushes changes/new assets. Deletes locally removed files on CDN.

Pushes assets that have been defined in the config to the CDN. Pushes all assets. Does not delete files on CDN.

Deletes all assets from CDN, independent from config file.

Serving Assets

Replace mix() with mix_cdn().
Replace asset() with asset_cdn().

Credits:

Icon from www.flaticon.com
Unmaintained git repo by Vinelab for inspiration only

Todo's:


All versions of asset-cdn with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
laravel/framework Version ~5.4|^6.0|^7.0|^8.0|^9.0|^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 boyo/asset-cdn contains the following files

Loading the files please wait ....