This package add an additional filter to prevent xss attack.
Require the package in composer.json
:
"ali-sharifi/xss-cleaner-filter": "dev-master"
Then in your project root directory run :
composer update
Then, include the following in the array on service providers in config/app.php
:
'AliSharifi\XssCleanerFilter\XssCleanerFilterServiceProvider' ,
You can clean your input HTML code from Xss attacks using xss filter :
<?php
Route::post('/',array('before' => 'xss',function(){
//
}));