Skip to content
Paride Azzari edited this page Aug 24, 2024 · 1 revision

The Locale entrypoint allows to retrieve countries list and dropdown options for your custom forms.

Countries

The method countries retrieves all the available countries.

use KeapGeek\Keap\Facades\Keap;

Keap::locale()->countries();

It returns an array with the country iso code as key and the country name as value.

Provinces

The method provinces retrieves a list of all the provinces of a country.

use KeapGeek\Keap\Facades\Keap;

Keap::locale()->provinces(string $country_code);

The input argument is a string of the iso country code, the return is an array with the province code as key and the province name as value.

Dropdown

The method dropdown retrieves a list of the default dropdown options.

use KeapGeek\Keap\Facades\Keap;

Keap::locale()->dropdown(string $type);

The input argument is a string which can be: "contact", "fax", "phone", "suffix", "title".

This method returns an array with the default dropdown options for that type.

Clone this wiki locally