PHP code example of jackardios / laravel-file-cache
1. Go to this page and download the library: Download jackardios/laravel-file-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/ */
jackardios / laravel-file-cache example snippets
use FileCache;
use Jackardios\FileCache\GenericFile;
// Implements Jackardios\FileCache\Contracts\File.
$file = new GenericFile('https://example.com/images/image.jpg');
FileCache::get($file, function ($file, $path) {
// do stuff
});
use FileCache;
use Jackardios\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));