Why are you logging these?
Does your app crash whenever an invalid URL is requested? If that's the case, you should fix that.
404's should not be logged.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have two routes.
in web.php
Route::get('/', function () {
return view('welcome');
});
Route::resource('posts', PostController::class );
I could find errors in log file.
Attacker send request something like these.
/?121asdasd
/?asd121
/posts/av123
/posts/123vv
It made an error file very big and it consumes too much php process up to max.
I would like to restrict the input and keep their ips in database to ban.
How can I restrict user router input optimally ?
@binggle you can install fail2ban on the server and create rules to automatically ban the incoming requests.
Please or to participate in this conversation.