// indices/templates.asciidoc:180

[source, php]
----
$params = [
    'name' => 'template_1',
    'body' => [
        'index_patterns' => [
            'te*',
        ],
        'order' => 0,
        'settings' => [
            'number_of_shards' => 1,
        ],
        'mappings' => [
            '_source' => [
                'enabled' => false,
            ],
        ],
    ],
];
$response = $client->indices()->putTemplate($params);
$params = [
    'name' => 'template_2',
    'body' => [
        'index_patterns' => [
            'tes*',
        ],
        'order' => 1,
        'settings' => [
            'number_of_shards' => 1,
        ],
        'mappings' => [
            '_source' => [
                'enabled' => true,
            ],
        ],
    ],
];
$response = $client->indices()->putTemplate($params);
----
