Skip to content

Instantly share code, notes, and snippets.

@shahidkarimi
Created December 6, 2019 21:43
Show Gist options
  • Save shahidkarimi/a090f0fa3e5a5ac0718af23b6796b333 to your computer and use it in GitHub Desktop.
Save shahidkarimi/a090f0fa3e5a5ac0718af23b6796b333 to your computer and use it in GitHub Desktop.
<?php
class Business extends PgModel
{
// your stuff
}
<?php
class PgModel extends Model
{
public function getDateFormat()
{
if(env('DB_CONNECTION') == 'pgsql')
return 'Y-m-d H:i:sP';
return parent::getDateFormat();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment