PHP code example of yaroslawww / laravel-release-protection

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

    

yaroslawww / laravel-release-protection example snippets


# app/Http/Kernel.php
protected $routeMiddleware = [
    // ...
    'first-party-ip'          => \ReleaseProtection\Http\Middleware\VerifyFirstPartyClientIp::class,
    'testers-email'           => \ReleaseProtection\Http\Middleware\TestersEmailMiddleware::class,
];

Route::middleware([ 'auth', 'testers-email:auth' ])
     ->group(function () {
     // 
     });
Route::get( 'my/events', \App\Http\Controllers\Events::class )
             ->middleware( [ 'first-party-ip:events' ] );
bash
php artisan vendor:publish --provider="ReleaseProtection\ServiceProvider" --tag="config"