PHPackages                             basteyy/plates-local-assets-copy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. basteyy/plates-local-assets-copy

ActivePlugin

basteyy/plates-local-assets-copy
================================

Plugin for Plates which cache remote assets at local storage

1.0.3(1y ago)19MITPHPPHP &gt;=8.0

Since Apr 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/basteyy/plates-local-assets-copy)[ Packagist](https://packagist.org/packages/basteyy/plates-local-assets-copy)[ RSS](/packages/basteyy-plates-local-assets-copy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Plates Local Assets Copy Extension
==================================

[](#plates-local-assets-copy-extension)

A plugin for the pure PHP template engine [plates](https://platesphp.com/). The extension downloads remote assets to local cache and provide the local public URL instead. More or less for local (offline) development.

Setup
-----

[](#setup)

First download the library via composer:

```
composer require basteyy/plates-local-assets-copy
```

Register the plugin in Plates:

```
use League\Plates\Engine;
use basteyy\PlatesLocalAssetsCopy\PlatesLocalAssetsCopy as PlatesLocalAssetsCopy;

$templateEngine = new Engine();
$templateEngine->loadExtension(new PlatesLocalAssetsCopy(
    __DIR__ . '/cache/', // Define where the file is stored
    '/public/path') // Define the public access to the file
);
```

Usage
-----

[](#usage)

Create the hash of a password

```
// Inside your template-file:
