Installing and managing modules from admin panel (#847)

This commit is contained in:
Yash Govekar
2020-10-19 19:40:28 +05:30
committed by GitHub
parent ca220f1cdf
commit 5803487d51
92 changed files with 1259 additions and 669 deletions

View File

@@ -7,6 +7,8 @@
* your install. Otherwise, any changes here will get overridden in an update!
*/
use Carbon\Carbon;
return [
'name' => env('APP_NAME', 'phpvms'),
'env' => env('APP_ENV', 'dev'),
@@ -92,7 +94,7 @@ return [
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Carbon' => \Carbon\Carbon::class,
'Carbon' => Carbon::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,

7
config/importer.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
return [
'importer' => [
'batch_size' => 20,
],
];

42
config/installer.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
return [
'php' => [
'version' => '7.3',
],
'cache' => [
// Default driver to use when no driver is present
'default' => 'file',
'drivers' => [
// 'Zend OPcache' => 'opcache',
// 'apc' => 'apc',
],
],
'extensions' => [
// 'bcmath',
'fileinfo',
'openssl',
'pdo',
'mbstring',
'tokenizer',
'json',
'curl',
],
// Make sure these are writable
'permissions' => [
base_path('bootstrap/cache'),
public_path('uploads'),
storage_path(),
storage_path('app/public'),
storage_path('app/public/avatars'),
storage_path('app/public/uploads'),
storage_path('framework'),
storage_path('framework/cache'),
storage_path('framework/sessions'),
storage_path('framework/views'),
storage_path('logs'),
],
];

View File

@@ -1,5 +1,6 @@
<?php
use App\Support\Modules\DatabaseActivator;
use Nwidart\Modules\Activators\FileActivator;
return [
@@ -11,6 +12,8 @@ return [
'routes' => 'Http/Routes/web.php',
'routes-api' => 'Http/Routes/api.php',
'routes-admin' => 'Http/Routes/admin.php',
'provider' => 'Providers/AppServiceProvider.php',
'route-provider' => 'Providers/RouteServiceProvider.php',
'event-service-provider' => 'Providers/EventServiceProvider.php',
'views/index' => 'Resources/views/index.blade.php',
'views/index-admin' => 'Resources/views/admin/index.blade.php',
@@ -29,6 +32,7 @@ return [
'routes-api' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'json' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'provider' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'route-provider' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'event-service-provider' => [
'LOWER_NAME',
'STUDLY_NAME',
@@ -36,7 +40,7 @@ return [
'CLASS_NAMESPACE',
],
'listener-test' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'views/index' => ['LOWER_NAME'],
'views/index' => ['LOWER_NAME', 'STUDLY_NAME'],
'views/index-admin' => ['LOWER_NAME', 'STUDLY_NAME'],
'views/frontend' => ['STUDLY_NAME'],
'views/admin' => ['STUDLY_NAME'],
@@ -89,7 +93,7 @@ return [
'filter' => ['path' => 'Http/Middleware', 'generate' => true],
'request' => ['path' => 'Http/Requests', 'generate' => true],
'routes' => ['path' => 'Http/Routes', 'generate' => true],
'provider' => ['path' => 'Providers', 'generate' => true],
'provider' => ['path' => 'Providers', 'generate' => false],
'assets' => ['path' => 'Resources/assets', 'generate' => true],
'lang' => ['path' => 'Resources/lang', 'generate' => true],
'views' => ['path' => 'Resources/views', 'generate' => true],
@@ -162,7 +166,7 @@ return [
'translations' => true,
],
'activator' => 'file',
'activator' => 'database',
'activators' => [
'file' => [
'class' => FileActivator::class,
@@ -170,5 +174,8 @@ return [
'cache-key' => 'activator.installed',
'cache-lifetime' => 0,
],
'database' => [
'class' => DatabaseActivator::class,
],
],
];

View File

@@ -1,10 +0,0 @@
{
"Awards": true,
"Importer": true,
"Installer": true,
"Sample": true,
"Updater": true,
"VMSAcars": true,
"Vacentral": true,
"TestModule": true
}

4
config/updater.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
return [
];