<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Server Requirements
    |--------------------------------------------------------------------------
    |
    | This is the default Laravel server requirements, you can add as many
    | as your application require, we check if the extension is enabled
    | by looping through the array and run "extension_loaded" on it.
    |
    */
    'core' => [
        'minPhpVersion' => '7.0.0',
    ],
    'final' => [
        'key' => true,
        'publish' => false,
    ],
    'requirements' => [
        'php' => [
            'openssl',
            'pdo',
            'mbstring',
            'tokenizer',
            'JSON',
            'cURL',
        ],
        'apache' => [
            'mod_rewrite',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Folders Permissions
    |--------------------------------------------------------------------------
    |
    | This is the default Laravel folders permissions, if your application
    | requires more permissions just add them to the array list bellow.
    |
    */
    'permissions' => [
        'storage/framework/'     => '775',
        'storage/logs/'          => '775',
        'bootstrap/cache/'       => '775',
    ],

    /*
    |--------------------------------------------------------------------------
    | Environment Form Wizard Validation Rules & Messages
    |--------------------------------------------------------------------------
    |
    | This are the default form field validation rules. Available Rules:
    | https://laravel.com/docs/5.4/validation#available-validation-rules
    |
    */
    'environment' => [
        'form' => [
            'rules' => [
                'app_name'            => 'required|string|max:50',
                'environment'         => 'required|string|max:50',
                'environment_custom'  => 'required_if:environment,other|max:50',
                'app_debug'           => 'required|string',
                'app_log_level'       => 'required|string|max:50',
                'app_url'             => 'required|url',
                'database_connection' => 'required|string|max:50',
                'database_hostname'   => 'required|string|max:50',
                'database_port'       => 'required|numeric',
                'database_name'       => 'required|string|max:50',
                'database_username'   => 'required|string|max:50',
                'database_password'   => 'nullable|string|max:50',
                
                // --- BAGIAN INI KITA UBAH JADI NULLABLE AGAR AMAN ---
                
                // Driver Teknis (Cache, Queue, Session)
                // Kita buat nullable atau string biasa karena sudah di-hardcode di Blade
                'broadcast_driver'    => 'string|max:50',
                'cache_driver'        => 'string|max:50',
                'session_driver'      => 'string|max:50',
                'queue_driver'        => 'string|max:50',
                
                // Redis (Tidak dipakai user, jadi nullable)
                'redis_hostname'      => 'nullable|string|max:50',
                'redis_password'      => 'nullable|string|max:50',
                'redis_port'          => 'nullable|numeric',
                
                // Mail (Tidak dipakai user saat install, jadi nullable)
                'mail_driver'         => 'nullable|string|max:50',
                'mail_host'           => 'nullable|string|max:50',
                'mail_port'           => 'nullable|string|max:50',
                'mail_username'       => 'nullable|string|max:50',
                'mail_password'       => 'nullable|string|max:50',
                'mail_encryption'     => 'nullable|string|max:50',
                
                // Pusher (Tidak dipakai)
                'pusher_app_id'       => 'nullable|string|max:50',
                'pusher_app_key'      => 'nullable|string|max:50',
                'pusher_app_secret'   => 'nullable|string|max:50',
                
                // --- PENGATURAN TOKO KITA (WAJIB) ---
                'APP_CLIENT_NAME'     => 'required|string|max:100',
                'APP_LICENSE_KEY'     => 'required|string|max:100',
                'PPN_RATE'            => 'required|numeric',
                'TELEGRAM_BOT_TOKEN'  => 'nullable|string',
                'TELEGRAM_CHAT_ID'    => 'nullable|string',
            ],
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Installed Middleware Options
    |--------------------------------------------------------------------------
    | Different available status switch configuration for the
    | canInstall middleware located in `canInstall.php`.
    |
    */
    'installed' => [
        'redirectOptions' => [
            'route' => [
                'name' => 'welcome',
                'data' => [],
            ],
            'abort' => [
                'type' => '404',
            ],
            'dump' => [
                'data' => 'Dumping a not found message.',
            ],
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Selected Installed Middleware Option
    |--------------------------------------------------------------------------
    | The selected option fo what happens when an installer instance has been
    | Default output is to `/resources/views/error/404.blade.php` if none.
    | The available middleware options include:
    | route, abort, dump, 404, default, ''
    |
    */
    'installedAlreadyAction' => '',

    /*
    |--------------------------------------------------------------------------
    | Updater Enabled
    |--------------------------------------------------------------------------
    | Can the application run the '/update' route with the migrations.
    | The default option is set to False if none is present.
    | Boolean value
    |
    */
    'updaterEnabled' => 'true',

];
