PHP code example of famdirksen / timezonelist

1. Go to this page and download the library: Download famdirksen/timezonelist library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

famdirksen / timezonelist example snippets


"    "famdirksen/timezonelist": "6.*"
},

...
'providers' => [
    ...
    Famdirksen\Timezonelist\TimezonelistServiceProvider::class,
],

Timezonelist::create('timezone');

Timezonelist::create($name, $selected, $attr);

Timezonelist::create('timezone', 'Asia/Ho_Chi_Minh');

Timezonelist::create('timezone', null, 'class="styled"');

Timezonelist::create('timezone', null, 'id="timezone" class="styled"');

Timezonelist::create('timezone', null, [
    'id'    => 'timezone',
    'class' => 'styled',
    ...
]);

$timezone_list = Timezonelist::toArray();

$this->validate($request, [
    'my-timezone-field' => [
        '