Controller cheat sheet - MTDdk/jawn GitHub Wiki
This is an overview over most common needed methods available in the Controllers.
-
params()Listing all the POST/PUT/URL/session parameters in the request. -
params(name)Return the list of values for the given parameter. -
param(name)Fetch a single parameter by name. If the parameter represents multiple values, only the first is returned. -
flash(name)Returns a single flash element to the view, which is only valid for a single request. Can be used like:$if(flash.name)$<div>$flash.name$</div>$endif$. So the$if()$checks if the flash with the given name is present at all. -
flash(name, value)Same asflash(name), but returns value instead of just name.