Created
December 6, 2019 21:43
-
-
Save shahidkarimi/a090f0fa3e5a5ac0718af23b6796b333 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Business extends PgModel | |
{ | |
// your stuff | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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