FIX: just another bugfix

This commit is contained in:
Michal Kváček
2017-09-14 20:17:16 +02:00
parent 73681a5a4d
commit f10847dede
7 changed files with 9 additions and 27 deletions
@@ -1,7 +1,5 @@
<?php
namespace Modules\$ModuleName$\Database\Migrations;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
+3 -3
View File
@@ -30,7 +30,7 @@ class Module extends Repository implements IModule
public function getContentModules()
{
return Cache::remember('enabled-content-modules', 3600, function () {
return Cache::remember('enabled-content-modules', setting('cacheModules', 3600), function () {
return ModuleModel::where('enabled', true)
->where('manages_content', true)
->get();
@@ -68,7 +68,7 @@ class Module extends Repository implements IModule
public function all()
{
return Cache::rememberForever('enabled-modules-and-template', function () {
return Cache::remember('enabled-modules-and-template', setting('cacheModules', 3600), function () {
return ModuleModel::where('enabled', true)
->get();
});
@@ -76,7 +76,7 @@ class Module extends Repository implements IModule
public function getOnlyModules()
{
return Cache::rememberForever('enabled-modules', function () {
return Cache::remember('enabled-modules', setting('cacheModules', 3600), function () {
return ModuleModel::where('enabled', true)
->where('is_template', false)
->get();
+1 -1
View File
@@ -70,7 +70,7 @@ class Template extends Repository implements ITemplate
public function getForModule(Module $module)
{
return Cache::rememberForever('templates-for-module', function () use ($module) {
return Cache::remember('templates-for-module-'.$module->id, setting('cacheModules', 3600), function () use ($module) {
return TemplateModel::where('module_id', $module->id)
->select(['template_name', 'name', 'description'])
->get();
@@ -49,11 +49,11 @@ class CreateMigration extends Command
}
while (is_null($name)) {
$name = $this->ask('Input migration name');
$this->migrationName = $name = $this->ask('Input migration name');
}
$stubName = $this->option('create') ? 'create' : 'new';
$content = file_get_contents(config('modules.paths.stubs') . '/Migrations/'.$stubName.'.stub');
$content = file_get_contents(config('modules.paths.stubs') . '/Migrations/' . $stubName . '.stub');
$content = $this->replacePlaceholders($content);
$migrationName = $path . $this->getMigrationName($name);
@@ -74,7 +74,7 @@ class CreateMigration extends Command
{
$replace = [
'$MigrationName$' => studly_case($this->migrationName),
'$ModuleName$' => $this->moduleName,
'$ModuleName$' => $this->moduleName,
'$TableName$' => $this->tableName
];
@@ -44,6 +44,7 @@ class EnableModule extends Command
$module->save();
\Cache::forget('enabled-modules');
\Cache::forget('enabled-content-modules');
\Cache::forget('enabled-modules-and-template');
$this->line('Module ' . $module->static_name . ' enabled.');
+1 -17
View File
@@ -14,21 +14,5 @@ define('LARAVEL_START', microtime(true));
|
*/
require_once __DIR__ . '/../app/CMS/Helpers/functions.php';
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
$compiledPath = __DIR__.'/cache/compiled.php';
if (file_exists($compiledPath)) {
require $compiledPath;
}
-1
View File
@@ -16,5 +16,4 @@ if ($uri !== '/' && file_exists(__DIR__ . '/public' . $uri)) {
return false;
}
require_once __DIR__ . '/app/CMS/Helpers/functions.php';
require_once __DIR__ . '/public/index.php';