PHP code example of markohs / protectionbanner

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

    

markohs / protectionbanner example snippets


Route::get('/','StaticPageController@getRoot')->middleware('protectionbanner');


    'autoregister' => ['web']

...
'web' => [
    \App\Http\Middleware\EncryptCookies::class,
...
    \Markohs\ProtectionBanner\Middleware\ProtectionBannerMiddleware::class,
...

    \Illuminate\Routing\Middleware\SubstituteBindings::class,
],
..

    'enabled_environments' => ['stage', 'prod', 'production'],

    'whitelist' => [
        'example/url',
        'example2'
    ],


    /*
     * Channel to log accept info, if necessary
     * Default: null
     * example: "accepts"
     */
    'logchannel' => "accepts"

$  php artisan vendor:publish --tag=ProtectionBanner