PHP code example of joynala / web-installer

1. Go to this page and download the library: Download joynala/web-installer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joynala / web-installer example snippets


try {
    $_SERVER['argv'];
} catch (Exception $e) {
    if (!file_exists(base_path('storage/installed')) && !request()->is('install') && !request()->is('install/*')) {
        header("Location: install");
        exit;
    }
}

'product' => '', // Your product's name.
'verify_code' => '', // A secret code.
'verify_purchase' => true, // Turn on purchase checks.
'verify_rules' => [
    // Rules for checking.
]

[
    'permission' => true,
    'restore' => [
        [
            'dir' => 'e.g., routes/web.php',
            'source_code' => file_get_contents('path/to/your/json'),
        ],
    ]
]

[
    'permission' => false,
    'message' => 'You provide a wrong purchase code.'
]
bash
php artisan vendor:publish --tag=web-installer-config