-
-
Save parzibyte/3248d72d8000a86375b4e56b55ae3701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php# Línea para que gist marque la sintaxis | |
Route::middleware("throttle:2,1")->group(function () { | |
Route::get("/limitada", function () { | |
return "Hola usuario. Solamente puedes verme 2 veces por minuto"; | |
}); | |
// Aquí abajo podrías agregar rutas que igualmente serán limitadas | |
// con el throttle de arriba | |
}); | |
Route::middleware("throttle:100,2")->group(function () { | |
Route::get("/menos_limitada", function () { | |
return "Hola usuario. Puedes verme 100 veces cada 2 minutos"; | |
}); | |
// Aquí abajo podrías agregar rutas que igualmente serán limitadas | |
// con el throttle de arriba | |
}); | |
Route::middleware("throttle")->group(function () { | |
Route::get("/limitada_defecto", function () { | |
return "Hola usuario. Puedes verme 60 veces cada 1 minuto, | |
lo cual es la configuración por defecto"; | |
}); | |
// Aquí abajo podrías agregar rutas que igualmente serán limitadas | |
// con el throttle de arriba | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment