PHP code example of jsefton / laravel-protocol

1. Go to this page and download the library: Download jsefton/laravel-protocol 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/ */

    

jsefton / laravel-protocol example snippets


/**
 * Automatically detect based on current protocol
 */
'auto' => false,

/**
 * Force everything to a set protocol either
 * 'http' or 'https'. If blank then won't 
 * force anything. Ignored if 'auto' is true.
 */
'protocol' => '',

/**
 * Use different rules per environment
 * Ignored if 'auto' is true or 'protocol' is set.
 */
'environments' => [
    'local' => [
        'https' => false,
        'redirect' => false
    ],
    'production' => [
        'https' => true,
        'redirect' => false
    ]
]
bash
php artisan vendor:publish --tag=protocol.config