PHP code example of fixer112 / laravel-sanitizer
1. Go to this page and download the library: Download fixer112/laravel-sanitizer 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/ */
fixer112 / laravel-sanitizer example snippets
return [
'global' => true, // Automatically apply to all web and API routes
];
protected $middleware = [
\Fixer112\Sanitizer\Middleware\Sanitizer::class,
];
Route::middleware(['sanitizer'])->group(function () {
// routes
});
bash
php artisan vendor:publish --tag=config --provider="Fixer112\Sanitizer\SanitizerServiceProvider"