$page->decrement($field, $by = 1, $max = null)

Decrement a field value by one or a given value

  • since: Kirby 2.3.0
  • $field (string)
    A field name
  • $by (integer)
    An integer by which to decrement
  • $min (integer)
    The min number
  • return ($page)

Example

<?php $page->decrement('likes') ?>