TP5 has made great changes, it is more flexible, less bloated, and has added some exciting features, such as php7, unittest, etc. However, many habits developed under TP3 may need to be changed in TP5.
1 Routing changes defined in tp3
In this way, you can access the same address http://xx.com/password and http://xx.com/Admin/Auth/password
/xx.com/Admin/Auth/password
But it doesn’t work in tp5, see Route.php line 1251
It is normal to access with the configured route, but it will not jump to admin/auth/password
http://xxx/password
Java code
[0] HttpException in Route.php line 1252
Illegal request: admin/auth/password
$route = [$module, $controller, $action];
;
$name2 = $name2 = strtolower(Loader::parseName($controller, 1 ) . '/' . $action);
[$name2])) {
; 'Module', 'module' = & gt; $ route];
}
2 model's Find, select and other methods returns the Model object, not data. You can use getData() to get the original data. It is recommended to define a method in the Model to query data using db(), and then expose the method to the controller for calls.
3 If you use Model()->save(); to add new data in foreach, you must add ->isUpdate(false). Otherwise, only the first one will be insert, and the others will become updates. This is probably a bug.