1. Go to this page and download the library: Download biigle/laravel-image-cache library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
if (!class_exists(FileCache::class)) {
class_alias(Biigle\FileCache\Facades\FileCache::class, 'FileCache');
}
use FileCache;
use Biigle\FileCache\GenericFile;
// Implements Biigle\FileCache\Contracts\File.
$file = new GenericFile('https://example.com/images/image.jpg');
FileCache::get($file, function ($file, $path) {
// do stuff
});
use FileCache;
use Biigle\FileCache\GenericFile;
FileCache::fake();
$file = new GenericFile('https://example.com/image.jpg');
$path = FileCache::get($file, function ($file, $path) {
return $path;
});
$this->assertFalse($this->app['files']->exists($path));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.