Image Cache Added
This commit is contained in:
parent
996834b667
commit
7a8fa99301
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Name of route
|
||||
|
|
@ -14,7 +13,7 @@ return array(
|
|||
|
|
||||
| Examples: "images", "img/cache"
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'route' => 'cache',
|
||||
|
||||
|
|
@ -28,12 +27,12 @@ return array(
|
|||
|
|
||||
| Define as many directories as you like.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'paths' => array(
|
||||
'paths' => [
|
||||
storage_path('app/public'),
|
||||
public_path('storage')
|
||||
),
|
||||
public_path('storage'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -49,13 +48,13 @@ return array(
|
|||
| The values of this array will define which filter class
|
||||
| will be applied, by its fully qualified name.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'templates' => array(
|
||||
'templates' => [
|
||||
'small' => 'Webkul\Product\CacheFilters\Small',
|
||||
'medium' => 'Webkul\Product\CacheFilters\Medium',
|
||||
'large' => 'Webkul\Product\CacheFilters\Large',
|
||||
),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -64,8 +63,7 @@ return array(
|
|||
|
|
||||
| Lifetime in minutes of the images handled by the imagecache route.
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
'lifetime' => 525600,
|
||||
|
||||
);
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,16 +2,13 @@
|
|||
|
||||
namespace Webkul\Product\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Webkul\Product\Models\ProductProxy;
|
||||
|
||||
use Webkul\Product\Observers\ProductObserver;
|
||||
use Webkul\Product\Console\Commands\PriceUpdate;
|
||||
use Illuminate\Foundation\AliasLoader;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Webkul\Product\Console\Commands\PriceUpdate;
|
||||
use Webkul\Product\Facades\ProductImage as ProductImageFacade;
|
||||
use Webkul\Product\Facades\ProductVideo as ProductVideoFacade;
|
||||
|
||||
use Webkul\Product\Models\ProductProxy;
|
||||
use Webkul\Product\Observers\ProductObserver;
|
||||
use Webkul\Product\ProductImage;
|
||||
use Webkul\Product\ProductVideo;
|
||||
|
||||
|
|
@ -52,7 +49,7 @@ class ProductServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
/**
|
||||
* Register Configuration
|
||||
* Register configuration.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -62,7 +59,7 @@ class ProductServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
/**
|
||||
* Register the console commands of this package
|
||||
* Register the console commands of this package.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -80,19 +77,24 @@ class ProductServiceProvider extends ServiceProvider
|
|||
*/
|
||||
protected function registerFacades(): void
|
||||
{
|
||||
// Product image
|
||||
/**
|
||||
* Product image.
|
||||
*/
|
||||
$loader = AliasLoader::getInstance();
|
||||
|
||||
$loader->alias('productimage', ProductImageFacade::class);
|
||||
|
||||
$this->app->singleton('productimage', function () {
|
||||
return app()->make(ProductImage::class);
|
||||
});
|
||||
|
||||
// Product video
|
||||
/**
|
||||
* Product video.
|
||||
*/
|
||||
$loader->alias('productvideo', ProductVideoFacade::class);
|
||||
|
||||
$this->app->singleton('productvideo', function () {
|
||||
return app()->make(ProductVideo::class);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue