phpvms/app/Console/Commands/ClearCaches.php
Nabeel S 7e742518bc
Module/plugin installation working #593 (#594)
* Remove the Sample module

* 593-Fix-Modules-From-Composer

* Fix pre/post install scripts in composer #593

* Formatting
2020-02-28 16:06:45 -05:00

42 lines
714 B
PHP

<?php
namespace App\Console\Commands;
use App\Contracts\Command;
use Nwidart\Modules\Facades\Module;
class ClearCaches extends Command
{
protected $signature = 'phpvms:caches';
protected $description = 'Clear all caches';
/**
* {@inheritdoc}
*/
public function handle()
{
self::clearCaches();
}
public static function clearCaches()
{
self::clearBootstrapCache();
self::clearModuleCache();
}
/**
* Clear the bootstrap/cache dir
*/
private static function clearBootstrapCache()
{
}
/**
* Rescan for new modules
*/
private static function clearModuleCache()
{
Module::scan();
}
}