Module/plugin installation working #593 (#594)

* Remove the Sample module

* 593-Fix-Modules-From-Composer

* Fix pre/post install scripts in composer #593

* Formatting
This commit is contained in:
Nabeel S
2020-02-28 16:06:45 -05:00
committed by GitHub
parent dbaac04eea
commit 7e742518bc
27 changed files with 343 additions and 642 deletions

View File

@@ -0,0 +1,41 @@
<?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();
}
}