generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 1
Locale
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.
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.
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.
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.