Page Size - Paginating GridView Yii2
Create a file PageSize.php , copy code below into it. class PageSize extends \yii\base\Widget { /** * @var string the label text. */ public $label = 'Show '; /** * @var integer the defualt page size. This page size will be used when the $_GET['pageSize'] is empty. */ const DefaultPageSize = 10; /** * @var string the name of the GET request parameter used to specify the size of the page. * This will be used as the input name of the dropdown list with page size options. */ public $pageSizeParam = 'pageSize'; /** * @var array the list of page sizes */ public $sizes = [5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 50 => 50, 100 => 100]; /** * @var string the template to be used for rendering the output. */ public $template = '{label} {list} entries '; /** * @var array the list of options for the drop down list. */