How does the Route::resource of Laravel verify routing parameters?

< H2 > this allows < / H2 >

visit / users/1 pass, visit / users/a will 404

Route::pattern("id", "\d+");
Route::resource("users", "UserController", ["parameters" => [
    //  Id pattern 
    "user" => "id",
]]);
Nov.24,2021

Route::resource('users', 'UserController')->where(['user' => '\d+');

if it is only int, directly limit the parameter type to int in the controller's show method

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36e14-2c041.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36e14-2c041.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?