Skip to content

Commit d40473d

Browse files
authored
Update CacheFallbackServiceProvider.php
1 parent 0117df1 commit d40473d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/CacheFallbackServiceProvider.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Cache\CacheServiceProvider;
66
use Illuminate\Cache\MemcachedConnector;
7+
use Illuminate\Cache\Console\ClearCommand;
78

89
class CacheFallbackServiceProvider extends CacheServiceProvider
910
{
@@ -48,4 +49,17 @@ public function register()
4849

4950
$this->registerCommands();
5051
}
52+
53+
/**
54+
* Register the cache related console commands.
55+
*
56+
* @return void
57+
*/
58+
public function registerCommands()
59+
{
60+
$this->app->singleton('command.cache.clear', function ($app) {
61+
return new ClearCommand($app['cache']);
62+
});
63+
$this->commands('command.cache.clear');
64+
}
5165
}

0 commit comments

Comments
 (0)