router::filter($name, $function)

Add a new router filter

  • $name (string)
    A simple name for the filter, which can be used by routes later
  • $function (\closure)
    A filter function, which should be called before routes