PHPackages                             jackiedo/timezonelist - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jackiedo/timezonelist

ActiveLibrary

jackiedo/timezonelist
=====================

A small package use to create a timezone list box in Laravel

5.1.3(4y ago)111591.9k↓20%19[2 PRs](https://github.com/JackieDo/Timezone-List/pulls)1MITPHPPHP &gt;=5.4.0

Since Feb 1Pushed 2y ago2 watchersCompare

[ Source](https://github.com/JackieDo/Timezone-List)[ Packagist](https://packagist.org/packages/jackiedo/timezonelist)[ RSS](/packages/jackiedo-timezonelist/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (15)Used By (1)

Laravel Timezone List
=====================

[](#laravel-timezone-list)

[![Fix coding standards](https://github.com/JackieDo/Timezone-List/actions/workflows/fix-coding-standards.yml/badge.svg?branch=5.x)](https://github.com/JackieDo/Timezone-List/actions/workflows/fix-coding-standards.yml)[![Latest Stable Version](https://camo.githubusercontent.com/d48ff25f5e4d08b2e2bc7392b8c08e30a079a545f7b2a1d7263e160db6d4d624/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f74696d657a6f6e656c6973742f762f737461626c65)](https://packagist.org/packages/jackiedo/timezonelist)[![Total Downloads](https://camo.githubusercontent.com/38ab7f47e82868cf6bd18774354fd32a677de62b4e182dc48025b92ca1611c43/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f74696d657a6f6e656c6973742f646f776e6c6f616473)](https://packagist.org/packages/jackiedo/timezonelist)[![License](https://camo.githubusercontent.com/1dd16739cd05bdb87a51f7eb97b44631d40eeeeab656e90ce57c81082e5ff8e1/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f74696d657a6f6e656c6973742f6c6963656e7365)](https://packagist.org/packages/jackiedo/timezonelist)

Overview
========

[](#overview)

- [Laravel Timezone List](#laravel-timezone-list)
- [Overview](#overview)
- [Feature](#feature)
- [Versions and compatibility](#versions-and-compatibility)
- [Documentation](#documentation)
    - [Installation](#installation)
        - [Step 1 - Require Package](#step-1---require-package)
        - [Step 2 - Register Service Provider](#step-2---register-service-provider)
        - [Step 3 - Register Facade Alias](#step-3---register-facade-alias)
    - [Usage](#usage)
        - [Working With Facade](#working-with-facade)
        - [Using As Regular Class](#using-as-regular-class)
    - [Available Methods](#available-methods)
        - [Render a timezone listbox](#render-a-timezone-listbox)
        - [Render a timezone array](#render-a-timezone-array)
        - [Filter the returned list](#filter-the-returned-list)
            - [Get only some specified groups](#get-only-some-specified-groups)
            - [Exclude some specified groups](#exclude-some-specified-groups)
        - [Change the layout of the returned list](#change-the-layout-of-the-returned-list)
            - [Decide whether to split group or not](#decide-whether-to-split-group-or-not)
            - [Decide whether to show the timezone offset or not](#decide-whether-to-show-the-timezone-offset-or-not)
        - [Reset all config and return new list](#reset-all-config-and-return-new-list)
- [Contributors](#contributors)
- [License](#license)

Feature
=======

[](#feature)

- Render a timezone listbox (select element) in Laravel
- Render a timezone array in Laravel

Versions and compatibility
==========================

[](#versions-and-compatibility)

Currently, there are some branches of Timezone-List is compatible with the following version of Laravel framework

Timezone-List branchLaravel version[4.x](https://github.com/JackieDo/Timezone-List/tree/4.x)4.x[5.x](https://github.com/JackieDo/Timezone-List/tree/5.x)5.x and later> This documentation is use for branch 5.x

Documentation
=============

[](#documentation)

Installation
------------

[](#installation)

You can install this package through [Composer](https://getcomposer.org) with the following steps:

### Step 1 - Require Package

[](#step-1---require-package)

At the root of your application directory, run the following command (in any terminal client):

```
$ composer require jackiedo/timezonelist
```

> **Note:** Since Laravel 5.5, [service providers and aliases are automatically registered](https://laravel.com/docs/5.5/packages#package-discovery). But if you are using Laravel 5.4 and earlier, you must register the Service Provider and the Facade manually. Do the following steps:

### Step 2 - Register Service Provider

[](#step-2---register-service-provider)

Open `config/app.php`, and add a new line to the providers section:

```
...
Jackiedo\Timezonelist\TimezonelistServiceProvider::class,
```

### Step 3 - Register Facade Alias

[](#step-3---register-facade-alias)

Add the following line to the aliases section in file `config/app.php`:

```
'Timezonelist' => Jackiedo\Timezonelist\Facades\Timezonelist::class,
```

Usage
-----

[](#usage)

### Working With Facade

[](#working-with-facade)

Laravel Timezone List has a facade with the fully qualified namespace is `Jackiedo\Timezonelist\Facades\Timezonelist`. You can perform all operations through this facade.

**Example:**

```
