Download the PHP package samuell/cdn-plugin without Composer

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

OctoberCMS CDN Plugin

Push, sync, clear and serve assets to/from a CDN or use it for including manifest files from webpack or laravel-mix.

https://octobercms.com/plugin/samuell-cdn

Usage

In your theme change asset links to use asset_cdn function.

Example:

Note: If you doesn't want to use CDN you can disable cdn in config and it will automatically fallback to theme path and use files from theme. (This is default configuration)

With manifest integration enabled:

We define file name that is compiled from Webpack or LaravelMix and exists in manifest.json file. Don't forget to enabled manifest integration and define correct manifest.json path in config file.

Getting assets from cdn that are not in manifest.json file use cdn function with full path to file:

After configuration (configuration steps are below) we can sync theme assets to cdn

Depending on theme run command to sync specific theme. For example to sync theme with name demo we use php artisan cdn:sync demo. If you want to remove old files that are compared with your local copy you can use flag --delete-old

Configuration

1. Configure Filesystem

If is your plan to use CDN, you can use this config. If not you can skip this step. Example is for AWS S3 with Cloudfront.

config/filesystems.php

2. Configure config

Create cdn.php file in config folder to configure cdn plugin, this allows to use different configs for developing or local enviroments.

Don't forget to define root filesystem folder same as assetsFolder best is to use default as assets to match october default theme assets folder.

config/cdn.php

Optional filesystem options:

Filesystem allows to define custom options. The following example is recommended for AWS S3.

cdn.php > filesystem.options

Commands

Sync Assets

Sync all assets but deletes old files that are on CDN.

Push Assets

Pushes assets but does not delete old files on CDN.

Delete all assets from CDN

Deletes all assets from CDN.

Twig Functions

Inspired by AsssetCDN package for Laravel https://github.com/arubacao/asset-cdn


All versions of cdn-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
composer/installers Version ~1.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 samuell/cdn-plugin contains the following files

Loading the files please wait ....