This version is outdated. You should upgrade your project to Mako 9.1 or Mako 10.0!
Getting started


This guide takes you through the steps needed to migrate from Mako 5.0.x to 5.1.x.



Add the new base_url config key to your application configuration file.


JSONP responses

Use the JSON response builder for both JSON and JSONP.


There is a new syntax for passing arguments to route middleware rules.

ORM foreign-keys

The ORM now uses Str::camel2underscored() instead of strtolower() when generating the foreign key names. Most applications should be unaffected but you can configure the foreign key name using the $foreignKeyName property so that you don't have to do any changes to your database.

Query builder

The query builder convenience trait has been removed. Use the where methods instead.


There is a new syntax for passing arguments to validation rules.

Piped validation rules (deprecated since Mako 3.6) are no longer supported, use an array instead.


Views are no longer auto rendered by the response class. They should be rendered in the controller.