setState('list.ordering', 'date'); $this->setState('list.direction', 'desc'); } } ?>
setTableName('#__mytable'); } } ?>In this example, the `MyModel` class extends the `ListModel` class and overrides its `__construct` method. In the method, the parent `__construct` method is called with the `$config` parameter. The database table name is then set using the `setTableName` method. Package library: Joomla\CMS\MVC\Model