未找到类'AlternativeLaravelCacheProviderAlternativeCacheStoresServiceProvider'



我有以下类:

namespace AppProviders;

use AlternativeLaravelCacheProviderAlternativeCacheStoresServiceProvider;

/**
* Note: Using 'dev-master' for the library. If *composer update* causes
* issue, then refer to library's stable release version in composer.json
* and update it.
*/
class CacheStoresServiceProvider extends AlternativeCacheStoresServiceProvider
{
static protected $redisDriverName = 'redis'; // 'redis','altredis'

static protected $fileDriverName = 'file'; // 'file','altfile'

public function register()
{
if (env('CACHE_DRIVER') == 'array') {
static::$fileDriverName = 'altfile';
}

parent::register();
}

}

使用它会导致以下错误参数

未找到类"AlternativeLaravelCache\Provider\AlternativeCacheStoresServiceProvider">

您必须将其添加到config/app.php文件中

'providers' => [
...,
AlternativeLaravelCacheProviderAlternativeCacheStoresServiceProvider::class,
],

相关内容

  • 没有找到相关文章