// indices/templates.asciidoc:231

[source, php]
----
$params = [
    'name' => 'template_1',
    'body' => [
        'index_patterns' => [
            'myindex-*',
        ],
        'order' => 0,
        'settings' => [
            'number_of_shards' => 1,
        ],
        'version' => 123,
    ],
];
$response = $client->indices()->putTemplate($params);
----
