Commit bf4f464f authored by Taylor Otwell's avatar Taylor Otwell

added bundle:refresh command to cli.

parent a0379ea4
......@@ -32,6 +32,13 @@ class Bundle {
*/
public static $routed = array();
/**
* The cache key for the bundle manifest.
*
* @var string
*/
const manifest = 'laravel.bundle.manifest';
/**
* Detect all of the installed bundles from disk.
*
......
......@@ -2,6 +2,7 @@
use Laravel\IoC;
use Laravel\File;
use Laravel\Cache;
use Laravel\Bundle;
use Laravel\CLI\Tasks\Task;
......@@ -55,6 +56,8 @@ class Bundler extends Task {
echo "Bundle [{$bundle['name']}] has been installed!".PHP_EOL;
}
$this->refresh();
}
/**
......@@ -102,6 +105,8 @@ class Bundler extends Task {
echo "Bundle [{$name}] has been upgraded!".PHP_EOL;
}
$this->refresh();
}
/**
......@@ -125,6 +130,16 @@ class Bundler extends Task {
}
}
/**
* Clear the bundle manifest cache.
*
* @return void
*/
public function refresh()
{
Cache::forget(Bundle::manifest);
}
/**
* Gather all of the bundles from the bundle repository.
*
......
......@@ -51,7 +51,7 @@ Autoloader::namespaces(array('Laravel' => path('sys')));
* each of them. If it's not cached, we'll detect them and then
* cache it to save time later.
*/
$bundles = Cache::remember('laravel.bundle.manifest', function()
$bundles = Cache::remember(Bundle::manifest, function()
{
return Bundle::detect(path('bundle'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment