Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add function to get all timezones #6

Merged
merged 1 commit into from
Jun 22, 2015

Conversation

iconjenchua
Copy link
Contributor

Added a new function to return the $timezoneList array. Useful when showing which timezone is saved in the database.

E.g.
'(UTC+10:00) Melbourne' instead of 'Australia/Melbourne'.

Controller:
public function show() {
$client = Client::with('Type')->find($id);
$this->data['client'] = $client;
$this->data['timezonelist'] = array_flip(Timezone::getTimezones());

return View::make('clients.show', $this->data);

}

View:
{{ $timezonelist[$client->timezone] }}

camroncade added a commit that referenced this pull request Jun 22, 2015
add function to get all timezones
@camroncade camroncade merged commit 3957bbf into camroncade:master Jun 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants