PHP code example of akaunting / laravel-firewall

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

    

akaunting / laravel-firewall example snippets


Route::group(['middleware' => 'firewall.all'], function () {
    Route::get('/', 'HomeController@index');
});

Route::group(['middleware' => 'firewall.whitelist'], function () {
    Route::get('/admin', 'AdminController@index');
});

Route::group(['middleware' => 'firewall.url'], function () {
    Route::get('/admin', 'AdminController@index');
});

firewall.all

firewall.agent
firewall.bot
firewall.geo
firewall.ip
firewall.lfi
firewall.php
firewall.referrer
firewall.rfi
firewall.session
firewall.sqli
firewall.swear
firewall.url
firewall.whitelist
firewall.xss
bash
php artisan vendor:publish --tag=firewall
bash
php artisan migrate