- Installed p7h/nas-file-manager package via private VCS repo - Published config/nas-file-manager.php with super_admin middleware restriction - Added NAS env vars to .env.example - Created admin/nas-storage page with connection info panel and file browser widget - Added NAS Storage link to admin sidebar (super_admin only) - Added SuperAdminController@nasStorage method and admin.nas-storage route - Includes all accumulated branch changes: profile wall, 2FA, audit logs, settings panel, country/phone/timezone components, posts, slideshow, playlist shares, video downloads/shares, comment likes, notifications, social links, and more Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('settings', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('key')->unique();
|
|
$table->text('value')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
// Seed defaults
|
|
$defaults = [
|
|
['key' => 'gpu_enabled', 'value' => 'true'],
|
|
['key' => 'gpu_device', 'value' => '0'],
|
|
['key' => 'gpu_encoder', 'value' => 'h264_nvenc'],
|
|
['key' => 'gpu_hwaccel', 'value' => 'cuda'],
|
|
['key' => 'gpu_preset', 'value' => 'p4'],
|
|
];
|
|
foreach ($defaults as $row) {
|
|
DB::table('settings')->insert(array_merge($row, [
|
|
'created_at' => now(), 'updated_at' => now(),
|
|
]));
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('settings');
|
|
}
|
|
};
|