Skip to content

Instantly share code, notes, and snippets.

@matiit
Created October 2, 2015 13:59
Show Gist options
  • Save matiit/39f303f391fb330c23cf to your computer and use it in GitHub Desktop.
Save matiit/39f303f391fb330c23cf to your computer and use it in GitHub Desktop.
<?php
public function getDates()
{
// In case it returns array of arrays:
return [
// You can specify second "element" which would be the name of the column with timezone values
['start_date', 'timezone'],
// Use default if second "argument" not provided
['some_other_date_field']
];
}
public function getDates()
{
// In case of returning array of strings - do what's Eloquent does right now.
return [
'column1', 'column2'
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment