The function of tp5.0 is similar to that of middleware.

1. Is the tp5.0 version, want to use functions similar to laravel middleware
2. After checking Baidu, tp seems to have a similar behavior, but does not quite understand
3. I have tried to use postposition behavior in routing, but if there are multiple routes, it is troublesome to add one by one
4.Route::post ("api/:version/test","api/:version.Index/test", [" after_behavior"= > "appapicontrollerv1LoginBase"]);
5. Do not want to write a base class to verify, and then other classes inherit this, so I hope to give an example or other directions to provide ideas

Apr.26,2021

behavior, which is what you call behavior, can be set uniformly under tag.php.


@ fgmy how to solve it? I use the hook, it still seems that the parameters do not know how to pass the forehead. Now I have the same problem as you

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-1b3c2c6-41333.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-1b3c2c6-41333.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?