Add Setting Migration dan module qrcode
This commit is contained in:
parent
19001d8530
commit
0ab8abda5f
@ -24,6 +24,7 @@
|
||||
"putrakuningan/cetaklabel-module": "dev-master",
|
||||
"putrakuningan/logs-module": "^1.0",
|
||||
"putrakuningan/usermanager-module": "dev-master",
|
||||
"simplesoftwareio/simple-qrcode": "^4.2",
|
||||
"spatie/laravel-activitylog": "^4.7",
|
||||
"spatie/laravel-permission": "^5.10",
|
||||
"wildside/userstamps": "^2.3",
|
||||
|
@ -1,11 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Core\Bootstrap\BootstrapAuth;
|
||||
use App\Core\Bootstrap\BootstrapDefault;
|
||||
use App\Core\Bootstrap\BootstrapSystem;
|
||||
|
||||
return [
|
||||
|
||||
'KT_THEME_BOOTSTRAP' => [
|
||||
'default' => \App\Core\Bootstrap\BootstrapDefault::class,
|
||||
'auth' => \App\Core\Bootstrap\BootstrapAuth::class,
|
||||
'system' => \App\Core\Bootstrap\BootstrapSystem::class,
|
||||
'default' => BootstrapDefault::class,
|
||||
'auth' => BootstrapAuth::class,
|
||||
'system' => BootstrapSystem::class,
|
||||
],
|
||||
|
||||
'KT_THEME' => 'metronic',
|
||||
@ -233,5 +237,74 @@ return [
|
||||
],
|
||||
],
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Settings Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default settings store that gets used while
|
||||
| using this settings library.
|
||||
|
|
||||
| Supported: "json", "database"
|
||||
|
|
||||
*/
|
||||
'store' => 'database',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JSON Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If the store is set to "json", settings are stored in the defined
|
||||
| file path in JSON format. Use full path to file.
|
||||
|
|
||||
*/
|
||||
'path' => storage_path() . '/settings.json',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The settings are stored in the defined file path in JSON format.
|
||||
| Use full path to JSON file.
|
||||
|
|
||||
*/
|
||||
// If set to null, the default connection will be used.
|
||||
'connection' => null,
|
||||
// Name of the table used.
|
||||
'table' => 'settings',
|
||||
// If you want to use custom column names in database store you could
|
||||
// set them in this configuration
|
||||
'keyColumn' => 'key',
|
||||
'valueColumn' => 'value',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you want all setting calls to go through Laravel's cache system.
|
||||
|
|
||||
*/
|
||||
'enableCache' => false,
|
||||
// Whether to reset the cache when changing a setting.
|
||||
'forgetCacheByWrite' => true,
|
||||
// TTL in seconds.
|
||||
'cacheTtl' => 15,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define all default settings that will be used before any settings are set,
|
||||
| this avoids all settings being set to false to begin with and avoids
|
||||
| hardcoding the same defaults in all 'Settings::get()' calls
|
||||
|
|
||||
*/
|
||||
'defaults' => [
|
||||
'foo' => 'bar',
|
||||
]
|
||||
|
||||
];
|
||||
|
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if (version_compare(Application::VERSION, '5.0', '>=')) {
|
||||
$this->tablename = Config::get('settings.table');
|
||||
$this->keyColumn = Config::get('settings.keyColumn');
|
||||
$this->valueColumn = Config::get('settings.valueColumn');
|
||||
} else {
|
||||
$this->tablename = Config::get('anlutro/l4-settings::table');
|
||||
$this->keyColumn = Config::get('anlutro/l4-settings::keyColumn');
|
||||
$this->valueColumn = Config::get('anlutro/l4-settings::valueColumn');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create($this->tablename, function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string($this->keyColumn)->index();
|
||||
$table->text($this->valueColumn);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop($this->tablename);
|
||||
}
|
||||
}
|
@ -308,6 +308,7 @@
|
||||
</div>
|
||||
<!--end:Menu item-->
|
||||
|
||||
|
||||
<!--begin:Menu item-->
|
||||
<div class="menu-item pt-5">
|
||||
<!--begin:Menu content-->
|
||||
@ -318,6 +319,17 @@
|
||||
</div>
|
||||
<!--end:Menu item-->
|
||||
|
||||
<!--begin:Menu item-->
|
||||
<div class="menu-item {{ $route[0] == "settings" ? "here" : "" }}">
|
||||
<!--begin:Menu link-->
|
||||
<a class="menu-link {{ $route[0] == "settings" ? "active" : "" }}" href="{{ route('settings.index') }}">
|
||||
<span class="menu-icon">{!! getIcon('setting-4', 'fs-2','duotone') !!}</span>
|
||||
<span class="menu-title">Setting Parameter</span>
|
||||
</a>
|
||||
<!--end:Menu link-->
|
||||
</div>
|
||||
<!--end:Menu item-->
|
||||
|
||||
<!--begin:Menu item-->
|
||||
<div data-kt-menu-trigger="click" class="menu-item menu-accordion {{ $route[0] == 'log' ? 'show' : '' }}">
|
||||
<!--begin:Menu link-->
|
||||
|
Loading…
Reference in New Issue
Block a user