feat: add tenant menu visibility
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('tenants_menues', function (Blueprint $table): void {
|
||||
$table->boolean('is_enabled')->default(true);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('tenants_menues', function (Blueprint $table): void {
|
||||
$table->dropColumn('is_enabled');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
DB::table('menues')
|
||||
->where('code', 'help.terms-and-conditions')
|
||||
->update([
|
||||
'content_type' => 'static',
|
||||
'static_content_schema' => json_encode([
|
||||
'html' => 'present|nullable|string',
|
||||
], JSON_THROW_ON_ERROR),
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
DB::table('menues')
|
||||
->where('code', 'help.terms-and-conditions')
|
||||
->update([
|
||||
'content_type' => 'dynamic',
|
||||
'static_content_schema' => null,
|
||||
]);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user