for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spinzar\Firewall\Middleware;
use Spinzar\Firewall\Abstracts\Middleware;
use Spinzar\Firewall\Events\AttackDetected;
class Url extends Middleware
{
public function check($patterns)
$protected = false;
if (!$inspections = config('firewall.middleware.' . $this->middleware . '.inspections')) {
return $protected;
}
foreach ($inspections as $inspection) {
if (!$this->request->is($inspection)) {
continue;
$protected = true;
break;
if ($protected) {
$log = $this->log();
event(new AttackDetected($log));